Page 1 of 1

YAJL - facing issue with loading JSOn from IFS

Posted: Sat Jul 01, 2023 4:02 pm
by THIYAGARAJAN
Hi All,
I am trying to load the json file from IFS path into Yajl tree parser but I am getting lexical error - invalid character in the text. I checked the json file in the online validator and it says it is a valid json.


docNode = yajl_stmf_load_tree( '/home/tpandian/txt1.json' : errMsg ); ->this is how I am trying to load it.

can someone help me on this..

Re: YAJL - facing issue with loading JSOn from IFS

Posted: Mon Jul 03, 2023 4:21 pm
by Scott Klement
Does the CCSID assigned to the file match it's contents?

Re: YAJL - facing issue with loading JSOn from IFS

Posted: Tue Jul 04, 2023 10:00 am
by THIYAGARAJAN
Hi Scott,
I am new to RPG and JSON. Earlier the CCSID was 37 and it gave me error and I modified the id to 1208 and then there was no error. Can you throw some light on how the CCSID for the Json file is defined?

Re: YAJL - facing issue with loading JSOn from IFS

Posted: Wed Jul 05, 2023 9:40 am
by Scott Klement
It is an attribute of the file, just as the filename, authorities, etc are attributes assigned to the file when it is created or tranferred to your system.

I can't tell you more than that, as I don't know anything about the software that places this file on your system or how it works.

Re: YAJL - facing issue with loading JSOn from IFS

Posted: Wed Jul 05, 2023 12:12 pm
by THIYAGARAJAN
Thanks scott, I just used a sample json date saved it in my IFS path and was trying to work on it.

Re: YAJL - facing issue with loading JSOn from IFS

Posted: Wed Jul 05, 2023 3:52 pm
by Scott Klement
What do you mean by "it saved in my IFS"? What saved it to your IFS? Is it a program running on the same computer, or is it sent over a network? If it's sent over a network, what software is being used to send it?