Search found 5 matches

by Scudge
Wed Jun 11, 2025 1:14 pm
Forum: YAJL-ILE
Topic: YAJLINTO handling varying number of array records
Replies: 8
Views: 8916

Re: YAJLINTO handling varying number of array records

Thanks for the reply, I will have a play using the path option following your example (I was close!).

Sorry, just one more question if I may, and I appreciate this is more of an RPGLE query than YAJLINTO.

My JSON response has a data item called __Metadata which luckily I don't need so have ignored ...
by Scudge
Mon Jun 09, 2025 4:46 pm
Forum: YAJL-ILE
Topic: YAJLINTO handling varying number of array records
Replies: 8
Views: 8916

Re: YAJLINTO handling varying number of array records

Thanks for your reply Scott.

I have made the changes as per your example and it now works perfectly (my temporary fix has also been removed).

I have also been able to remove the 'allowmissing=yes" option which is another bonus.

I must have added the num_field to every data structure, starting ...
by Scudge
Mon Jun 09, 2025 3:42 pm
Forum: YAJL-ILE
Topic: YAJLINTO handling varying number of array records
Replies: 8
Views: 8916

Re: YAJLINTO handling varying number of array records

I have implemented a temporary work around on this one (in case it helps anyone else in the future).

The program/API will only get called once per day so +nanoseconds extra run time is irrelevant.

I have reverted back to the code from my original post, but just before executing the data-into ...
by Scudge
Mon Jun 09, 2025 12:50 pm
Forum: YAJL-ILE
Topic: YAJLINTO handling varying number of array records
Replies: 8
Views: 8916

Re: YAJLINTO handling varying number of array records

Thanks for the reply.

I have tried using the countprefix option and no matter which data structure I add the num_ variable to, I always get the answer of 64 and I have no idea why.

Below is where I have added num_ExRateList into the top level Root object, but as I say it doesn't matter which data ...
by Scudge
Thu Jun 05, 2025 4:49 pm
Forum: YAJL-ILE
Topic: YAJLINTO handling varying number of array records
Replies: 8
Views: 8916

YAJLINTO handling varying number of array records

Hi,

I'm new to YAJLINTO and working with JSON so please go easy on me :-)

Doesn't help that my first attempt is with a (I think) complex JSON!

Below is a an example of the JSON response I am trying to parse. It's returned from an API call to retrieve a set of exchange rates on a given date, and ...