Forums > MaxMSP

Json parser?


August 27, 2013 | 8:46 pm

I am receiving over udp an osc message with a json string:

{
"uniqueID": string,
"number": string
"name": string
"listName": string
"type": string
"colorName": string
"flagged": number
"armed": number
"cues": [ { }, { }, { } ]
}

Is there an abstraction or anything that will parse this? The keys will be static if that helps.

Thanks
GW

August 28, 2013 | 5:10 am

You might have some chances with dict.deserialize.

August 28, 2013 | 8:12 am
August 28, 2013 | 8:45 am

This is almost ok:

— Pasted Max Patch, click to expand. —
August 28, 2013 | 1:41 pm

dict.deserialize followed by dict.itter did the job!

Thanks
GW

April 15, 2014 | 9:54 pm

How so? I have a similar JSON string and can’t figure out how to parse it with dict.deserialize and dict.itter. Maybe I am just too tired to figure it out. Please post a patch if you don’t mind.


Jan
April 16, 2014 | 3:44 am

another option would be to do the parsing in JavaScript directly using JSON.parse(your-json-string)

March 19, 2015 | 2:38 am

Hi folks, hope it’s not frowned upon here to revive a thread…
I seem to be having the same issue as bpcook and I was wondering if/how you solved it?

Cheers
pc

Viewing 8 posts - 1 through 8 (of 8 total)

Forums > MaxMSP