|
On May 30, 2023, at 11:13 AM, Sean Courtney <scourtney@xxxxxxxxxxx> wrote:
Hello all,
I am having a strange encounter with YAJL ….
The naming on my DS matches the JSON exactly and parsing seems to work
partially ….
I have 1 header and multiple lines ….
The header is processed and some of the lines but then in the middle it just
stops with an error : The document for the DATA-INTO operation does not
match the RPG variable
I am using QIBM_RPG_DATA_INTO_TRACE_PARSER to view what is being processed
and I can locate where the parser stops …but I have no idea why …
[code]
dcl-s jsonData Varchar(100) Inz('/tmp/test.json');
dcl-ds data dim(50) Qualified;
akt_id char(36);
adr_id char(36);
per_id char(36);
usr_id char(36);
prj_id char(36);
url_id char(36);
.
.
.
dcl-ds mocrm_positionen Dim(50);
pos_id char(36);
akt_id char(36);
art_id char(20);
art_pl char(6);
art_ean1 char(13);
.
.
end-ds data;
end-ds mocrm_positionen;
eval options = 'doc=file case=convert allowextra=yes';
DATA-INTO data %Data(%trim(jsonData):
%trim(options))
%Parser('YAJL/YAJLINTO');
[code]
The parser stops at udt for no apparent reason …
The values when it stops are ..
"uusr": "e6754fd0-251d-425d-9aa5-452519577999",
"udt": "2023-05-26 11:03:16",
Any help would be greatly appreciated…
Mit freundlichen Grüßen / Kind regards / Bien à vous,
Seán
--
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@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
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.