Json parser?


    Aug 28 2013 | 3:46 am
    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

    • Aug 28 2013 | 12:10 pm
      You might have some chances with dict.deserialize.
    • Aug 28 2013 | 3:12 pm
    • Aug 28 2013 | 3:45 pm
      This is almost ok:
    • Aug 28 2013 | 8:41 pm
      dict.deserialize followed by dict.itter did the job!
      Thanks GW
    • Apr 16 2014 | 4:54 am
      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.
    • Apr 16 2014 | 10:44 am
      another option would be to do the parsing in JavaScript directly using JSON.parse(your-json-string)
    • Mar 19 2015 | 9: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
    • Jun 29 2017 | 11:32 am
      just in case
      function f (){
      	var str =  '{ "name":"John", "age":31, "city":"New York" }';
      	var res = JSON.parse(str);
       	post(  res.name + '\n' );
      	post(  res.age + '\n' );
      	post(  res.city + '\n' );
      }