× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Suren,

I tried your second example (the one you say "errors out").  I did not receive an error, it worked without any problems for me. This is what I did to try it:

1. I copy/pasted your JSON example to a file in the IFS (I used the name 'suren.json')

2. I used the following RPG code (based on yours, but changed slightly to make it a complete program)


**free

Dcl-Ds playerProfile qualified;
  title char(5);
  firstName Char(25);
  lastName char(25);
End-Ds;

data-into playerProfile %DATA( 'suren.json'
                             : 'case=convert doc=file +
path=json/data/playerProfile +
                                allowmissing=yes allowextra=yes')
                          %PARSER( 'YAJLINTO'
                                 :'{ +
                                     "document_name": "json", +
                                     "value_null": " " +
                                   }');

dsply playerProfile.title;
dsply playerProfile.firstName;
dsply playerProfile.lastName;

*inlr = *on;


What do I need to do differently to make it fail with an error?

-SK


On 6/10/2019 9:16 PM, Suren K wrote:
Hi Everyone,

I am using the Scott Klement's YAJL parser for Parsing the JSON Document. I
am receiving an error when i parsing a document. Let me explain it in two
scenario, Scenario 1 (I can Parse the JSON Document) and Scenario 2 (I
cannot Parse the JSON Document which i am receiving an Error)



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.