07-24-2023 06:35 AM - edited 07-24-2023 06:36 AM
I tried to decode but couldn't, please help me!
{ "data": { "PGAList": [ {"staCode": "D001", "pga": 8.848}, {"staCode": "D002", "pga": 5.751}, {"staCode": "D003", "pga": 5.469}, {"staCode": "D005", "pga": 4.347}, {"staCode": "D006", "pga": 6.411} ] } }
Solved! Go to Solution.
07-24-2023 06:55 AM
Assuming you set the correct labels, you only need to change pga from string to double.
07-24-2023 07:05 AM
I found out that I had other setup issues. But your reply saved me a lot of debugging time. now i'm done
07-24-2023 12:08 PM
I see your immediate issue is already solved, but I just thought I would note that the native LabVIEW JSON is a bit "fragile" in that the cluster passed in has to match the JSON exactly or you get nothing at all.
For you or anyone else who comes along later, I would recommend considering using an alternate library. I've had good luck with this one:
https://www.vipm.io/package/jdp_science_jsontext/
It's slower but a lot more tolerant of minor JSON changes and will give partial decodes rather than nothing if the format is close but not exact.
07-26-2023 10:11 AM
Ok thank you for your help, I will try to see what you said. Have a nice day