View previous topic :: View next topic
|
Author |
Message |
mtv.sbo
New User
Joined: 07 Mar 2017 Posts: 2 Location: Brazil
|
|
|
|
Hi,
I have a program in PL/I that handle a JSON file and it's working fine today.
It calls the function HWTJPARS to parse the json.
But now the JSON file will contain array and the program ends in error because of the brackets [] from the array. The reason text from the function is: "Unexpected token parsing JSON value at offset 212"
Any suggestions?
Here is a sample of the part of the JSON:
"name":{"isInterval":false,"options":["Tony","Steve"]} |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1314 Location: Vilnius, Lithuania
|
|
|
|
Square brackets are not part of the EBCDIC invariant character set. The ones you see may not be the ones the JSON parser expects. |
|
Back to top |
|
|
mtv.sbo
New User
Joined: 07 Mar 2017 Posts: 2 Location: Brazil
|
|
|
|
prino wrote: |
Square brackets are not part of the EBCDIC invariant character set. The ones you see may not be the ones the JSON parser expects. |
Hi, thanks for the response. Do you have any suggestions ?
Maybe I need convert the json before call the function, or there is a character in EBCDIC that represents the [] ? |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1314 Location: Vilnius, Lithuania
|
|
|
|
You're in Brazil, so (probably) using codepage 037/1140, with "[" & "]" encoded as 0xBA and 0xBB. My wild (educated) guess is that the JSON parser uses another codepage, possibly 1047 where they are encoded as 0xAD and 0xBD...
See en.wikipedia.org/wiki/EBCDIC_code_pages |
|
Back to top |
|
|
|