The JSONExtractValue and JSONExtractLargeValue methods retrieve the text representation of the value of an entity in a JSON instance. JSONExtractLargeValue takes the same input parameters and operates the same as JSONExtractValue; however, the return type and size are different.
These methods search the JSON object specified by JSON_expr and get the value of the entity name specified by JSONPath_expr. The entity name is represented by a JSONPath formatted string.
JSONPath_expr should select zero JSON items or a single JSON item, which must be either a scalar value or a JSON null. If more than one value matches JSONPath_expr, a warning and an error message string indicating that multiple results were found are returned.
Condition | Return Value |
---|---|
Entity found in JSON instance. | String that is value of entity |
More than one value matches query expression specified by JSONPath_expr. | Warning and error message string "*** ERROR MULTI RESULT ***" |
Result is empty string. | Empty string |
Result is JSON null. | Vantage NULL |
Entity not found in JSON object. | Vantage NULL |
JSON_expr argument is null. | Vantage NULL |