|
Hello,
The TRIM feature of DATA-INTO (or XML-INTO) removes these extra
blanks. This has nothing, specifically, to do with YAJLINTO -- it is
part of RPG, not part of YAJLINTO.
Try this:
DATA-INTO input %DATA(json_doc: 'trim=none') %PARSER('YAJLINTO');
The TRIM feature is removing the spaces, so specifying TRIM=NONE will
solve the problem.
-SK
On 9/29/2020 2:21 AM, Suren K wrote:
Hi Everyone,have
I am using Scott Klement's DATA-INTO parser program YAJLINTO for parsing
the JSON Document into a Data structure. I came across an issue which I
wanted to know whether anyone else came across the same issue or do we
a solution for that?the
For Example
JSON Document:
{
"name" : "abcd efgh"
}
Data Strcuture
Dcl-ds input;
name char(100);
end-ds;
I have 4 blank spaces between the value "abcd" and "efgh", after doing
DATA-INTO i am getting the value in the data structure field as name =(with
"abcd efgh". 4 blank spaces automatically converted into a single
blank space.
I tried debugging the code YAJLINTO, we are passing the correct value
4 blank spaces) to QrnDiReportValueCCSID procedure, i don't know whetherand
the value is getting converted.
Anyone come across a similar scenario or have we already discussed this
I missed the conversation?--
Any help will be very much appreciated.
Regards,
Surender K
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.
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.