× 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.



I would think the best approach would be to increase the size of the receiver field to (say) 50 - or whatever you think the max might be). I would;d also declare it as a varchar - that way you have an easy way of testing it for length prior to moving it to its final "resting place" in a 25 character field.

If %Len(bigJSONField) > %Len(targetField);
Dsply ( 'Truncating ' + %char( %Len(bigJSONField) - %Len(targetField)) + ' characters' );
EndIf;


www.partner400.com
www.SystemiDeveloper.com

On Jul 1, 2019, at 5:16 PM, Suren K <suren7437@xxxxxxxxx> wrote:

Hi All,

Currently i am using Scott's YAJL DATA-INTO for parsing a JSON document. I
need help in overcome the below scenario

Current i defined a data structure with field 1 as 25 character, but in the
JSON document the corresponding field have data with length more than 25
character. In this case the DATA-INTO option automatically truncated the
data to 25 character and populated into the Data structure which is as per
my expectation. But i want to know that what are all the field values got
truncated in the DATA-INTO process.

How can i identify the field names which value got truncated in the
DATA-INTO Process?

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@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 thread ...

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.