JSON file manipulation in idl [message #92976] |
Mon, 04 April 2016 10:30  |
rojofija
Messages: 9 Registered: January 2015
|
Junior Member |
|
|
Dear friends,
Does anyone know a practical way to read, manipulate, and extract elements from a file in JSON format using IDL?.
I would like to manipulate the elements similarly as it is done with conventional arrays.
Any feedback is very welcome.
All the best,
Roberto.
|
|
|
Re: JSON file manipulation in idl [message #92977 is a reply to message #92976] |
Mon, 04 April 2016 10:41  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 4/4/16 11:30 AM, rojofija wrote:
> Does anyone know a practical way to read, manipulate, and extract
> elements from a file in JSON format using IDL?.
>
> I would like to manipulate the elements similarly as it is done with
> conventional arrays.
JSON_PARSE was added in IDL 8.2. The only issue for you is to read your
file into a string, then pass that to JSON_PARSE. Checkout the TOARRAY
to get standard IDL arrays.
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
|
|
|