0

Exception : Error reading JObject from JsonReader. Current JsonReader item is not an object

George Tsamis 11 months ago in Devices / Http updated 10 months ago 4

I have an http response like:

[{"1":"WiBee - Reset Energy Counters","v":true},{"1":"WiBee - Phase 1 Voltage","v":232.48},{"1":"WiBee - Phase 2 Voltage","v":225.12},{"1":"WiBee - Phase 3 Voltage","v":228.64}]

I have used the token name [1].v to get the Phase 1 Voltage but i always get an error 

Debug : 20/1/20 6:37:20 μμ : Devices\GetEnergyMeterData\FetchDataFromLM : Exception : Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray. Path '', line 1, position 1. ...

Any help?

Hi,

In fact, if I load the response on a JSONPath Expression Tester (e.g. https://jsonpath.curiousconcept.com/), I get the correct value with the [1].v token

Do you have the correct parser type set?

Can you test with .[1].v ?

Hi,

I know the path is correct but i always get the same error and no value.

I laso tried .[1].v [2].v .[2].v and datatype string with the same token names without any luck

check attached screenshots if i am missing something


Hi,

Can you tell us which configurator version you're using?

On a previous version, it seems that http devices with authentication we're having some problems. Can you check that and tell us?

Best regards

Hi,

Sorry for late reply.

Configurator version is 4.6.26