Adding a new function to the collection of JSON function:
JSONGetType( json ; keyOrIndexOrPath ).
The function will return the type of the targeted json path element:
The new JSON functions support the development of general, exchangeable codes (aka modules). Using json to pass data between scripts, modules and systems will help to develop robust interfaces. With the new function JSONGetType the program can react variable according the json data type.
- With the function it is possible to distinguish between JSONNull and an empty JSONString.
- If the type is JSONObject or JSONArray, the script can continue to process the content in a loop accordingly.