Special considerations for JSON support on IBM i:
Here are the few considerations while using the JSON parse and generate functions for IBM i as the target environment.
- Error handling while parsing JSON on IBM i will be limited and would list down errors on
following category: Below are the return codes which will be provided by JSON Processor to the JSON error handler:
Table 1. Seq No. Error Message ID Message Description 1 GEN0350 Function convertFromJSON found an error in JSON string Generic error statement. 2 GEN0351 Syntax Error. Offset=<Displacement in input JSON String> expected=<Expected char/string> found=<Char/String found in the input JSON String> Issued when Syntax error is detected. 3 GEN0352 Non-nullable field <FFF> not found in the JSON string Field (defined as non-nullable) not present in the input JSON string. 4 GEN0353 Non-nullable field <FFF> found to be to null Value found to be NULL in input JSON string for a non-null field. 5 GEN0354 Value <NNN> would be truncated when copying to field <FFF> Target field capacity not adequate to store the received value. 6 GEN0355 Iconv conversion error. Character <SSS> cannot be converted to codepage <NNNN> Code page conversion error. - 0 - No issues
- 8 - Non-recoverable error
- The JSON string to be processed should not exceed 32767 number of bytes.
- Following EGL data types will be included in upcoming releases:
- Dictionary
- NUM
- BIN