FNC_GetJSONInfo takes a JSON type instance as an input argument. The JSON type instance is passed to the function as a JSON handle. The function returns:
- The maximum possible length, in bytes, of the JSON type instance specified by jsonHandle. This information is returned in the maxLength parameter.
- The character set of the JSON type instance specified by jsonHandle. This information is returned in the charset parameter. The return value is one of the following as defined in sqltypes_td.h:
- An indication of whether or not the JSON data is stored as a LOB. This is specified by the numLobsparameter.
Based on the numLobsvalue, the user can determine which FNC routines to use for reading and writing JSON data:
- If the JSON data is not stored as a LOB, you must use FNC_GetInternalValue or FNC_SetInternalValue.
- If the JSON data is stored as a LOB, you must use FNC_GetJSONInputLob or FNC_GetJSONResultLob together with the LOB FNC routines.