Support JSON environment variables

rconn

Administrator
Staff member
May 14, 2008
10,746
97
#1
Support JSON environment variables

The UnQLite DB suggestion under review uses JSON. Maybe supporting that would let us have JSON environment variables. Similar to arrays, these could be initialized using SETJSON varname. Data could be set/extracted using %envvar[...][...] notation for strings, objects members, array elements, etc. The SET command could be used to change an existing value, but the SETJSON command could be used to modify an existing JSON var to add or delete an object, object member, array, or array element.

Tim Butterfield on July 01, 2016 19:13
 
Likes: Juppycmd
Dec 10, 2014
63
1
#2
Getting JSON support would be great, for example the latest exiftool supports this format and it would be at last possible to read/write tags into/from arrays without any hassle. Here's an example of the exiftool i/o:

[{
"SourceFile": "test.jpg",
"ExifToolVersion": 10.47,
"XMPToolkit": "Image::ExifTool",
"SubjectCode": "06006008",
"CopyrightYear": 2017,
"Megapixels": 0.627
}]


... or for multiple images (multi-dimensional array in tcc):

[{
"SourceFile": "test1.jpg",
"ExifToolVersion": 10.47,
"XMPToolkit": "Image::ExifTool",
"SubjectCode": "06006008",
"CopyrightYear": 2017,
"Megapixels": 0.627
},
{
"SourceFile": "test2.jpg",
"ExifToolVersion": 10.47,
"XMPToolkit": "Image::ExifTool",
"SubjectCode": "06006008",
"CopyrightYear": 2017,
"Megapixels": 0.627
}]