cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
afterword
Level IV

Parsing JSON data

Does anyone know of an existing script or code snippets to get me started on parsing JSON data?  I'm particularly interested in how to handle the process of reading each key:value hash and writing it to the JMP data table.

Here's a sample with a group ID number, followed by the timestamp:reading hashes.

{ "1":[[1341118805, 0.654], [1341205195, 0.654]] , "10037506":[[1341118820.000, 0.900], [1341118880.000, 0.000], ... }


4 REPLIES 4
afterword
Level IV

Re: Parsing JSON data

Never mind - took care of it in Python.

I may work on an R implementation just for ease of passing values between JMP and the parser if the interface with Python proves to be too cumbersome.

pmroz
Super User

Re: Parsing JSON data

The JSON format looks like a list of lists.  You could use the JSL WORDS function for parsing, and an associative array for storage.

afterword
Level IV

Re: Parsing JSON data

Good eye!  I'll see if there's a simple way of unpacking it in JSL.  I wanted to avoid reinventing the wheel, but it might be a fun test of my JSL skills, and I'm sure there are others out there who need to parse JSON data.

Thanks for the suggestion!

XanGregg
Staff

Re: Parsing JSON data

I also had a need for getting JSON data into JMP and wrote some parsing functions, which I just uploaded to the File Exchange at JSON Parsing Functions.

(Trying for the record for oldest question answered.)