YAJL - facing issue with loading JSOn from IFS

Discussions relating to the ScottKlement.com port of the open source YAJL JSON Reader/Generator. This includes the YAJL tool as well as the YAJLR4, YAJLGEN, YAJLINTO and YAJLDTAGEN add-ons from ScottKlement.com. http://www.scottklement.com/yajl/
Post Reply
THIYAGARAJAN
Posts: 7
Joined: Sat Jul 01, 2023 3:57 pm

YAJL - facing issue with loading JSOn from IFS

Post 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..
Scott Klement
Site Admin
Posts: 658
Joined: Sun Jul 04, 2021 5:12 am

Re: YAJL - facing issue with loading JSOn from IFS

Post by Scott Klement »

Does the CCSID assigned to the file match it's contents?
THIYAGARAJAN
Posts: 7
Joined: Sat Jul 01, 2023 3:57 pm

Re: YAJL - facing issue with loading JSOn from IFS

Post 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?
Scott Klement
Site Admin
Posts: 658
Joined: Sun Jul 04, 2021 5:12 am

Re: YAJL - facing issue with loading JSOn from IFS

Post 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.
THIYAGARAJAN
Posts: 7
Joined: Sat Jul 01, 2023 3:57 pm

Re: YAJL - facing issue with loading JSOn from IFS

Post by THIYAGARAJAN »

Thanks scott, I just used a sample json date saved it in my IFS path and was trying to work on it.
Scott Klement
Site Admin
Posts: 658
Joined: Sun Jul 04, 2021 5:12 am

Re: YAJL - facing issue with loading JSOn from IFS

Post 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?
Post Reply