|
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,Document. I
I am using the Scott Klement's YAJL parser for Parsing the JSON
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)
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
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.