LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to parse data from JSON String

Solved!
Go to solution

Hello All,

 

I am trying to parse the data from a Json string via. thingspeak server.

 

Read URL: https://api.thingspeak.com/channels/1038537/feeds.json?results=2

 

However, I keep getting an error or a broken wire issue. The thingspeak server offers two URL's one to read the channel field and other to read feed. I have tried both but didn't get any help.

 

Since I don't have much experience in building clusters to define data type I used the JSON to Cluster VI to generate the cluster.

 

Attached is the VI, can someone help me with this.

0 Kudos
Message 1 of 4
(1,908 Views)

I recommend installing JSONtext (from JDP Science) package from VIpackage manager and using that instead. The VI Attached works I rewired body output to from JSON VI as well

0 Kudos
Message 2 of 4
(1,896 Views)
Solution
Accepted by topic author layman93

I took a second look at your problem and found out that your cluster was just defined wrong; you put the array in the channel cluster and didn't define name for cluster inside array and caused the wire to break 

Message 3 of 4
(1,872 Views)

Thank you Sebram99,

 

It works now, yes I figured it out why it was causing the wire to break.

 

Thank you

0 Kudos
Message 4 of 4
(1,851 Views)