Get JSON String Value

The command is using JSON Pointer to locate the specified JSON member and if found returns its value as a string. If multiple entries are found they will all be combined into a single string.

Input Arguments

 

0

Integer

JSON File Handle

The handle to the opened JSON file is returned by the “Open JSON File” MP command.

1

String

JSON Pointer

JSON pointer to the desired JSON element. For

example, /data/2/attributes

 

Return Arguments

 

1

String

String Value

Returns a JSON element value as a string.

 

Returned Status

 

SUCCESS

The file was parsed successfully.

PARTIAL SUCCESS

The String could not be resolved.

FAILURE

The File could not be found.

 

Remarks

If the JSON pointer can’t be resolved, the command fails. To avoid invalid JSON pointer input, retrieve all available valid JSON pointers of a specific JSON element by using the MP command “Get JSON Tree Pointer List”.

If the found JSON member is a JSON array or object, then the entire content returns as a JSON string. For more spe- cific JSON pointers, the command returns string, Boolean, or number value as a string.