- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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], ... }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.)