cancel
Showing results for 
Search instead for 
Did you mean: 

SAW 17: Question on JSON parsing (dbo.sp_parse_json procedure)

Stalker4
Explorer
163

Hi,

SAP SQL AnyWhere 17.0.10.

There is some JSON packet. I pass it to the procedure "sp_parse_json" for processing

declare cJSON long varchar;
call dbo.sp_parse_json('sql_array', cJSON);

I will get the parsed JSON package into the variable "sql_array".

Question: How do I check "sql_array" for the presence of a certain field in a JSON packet? JSON-package, whether this field is there or not ?

View Entire Topic
PCollins
Participant
0 Kudos

In our experience the only way to do this is by using exception handling.

sp_parse_json work for basic scenarios, but as soon as there is any chance of there being variables within the structure we have found it is best to parse with an external procedure