|
From: "Barbara Morris" <bmorris@xxxxxxxxxx>of
To: rpg400-l@xxxxxxxxxxxx
Date: 10/01/2019 10:33 PM
Subject: Re: DATA-INTO Json failing
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx>
On 2019-01-10 1:34 AM, Don Brown wrote:
I am hoping someone can advise how I need to create the data structure
APIDATA-INTO with this json string.
...
But the following line api_product_list_json is an array but it has no
elements ?
...
{
"refresh_token_expires_in" : "0",
"api_product_list" : "[P2P Rideshare API Product]",
"api_product_list_json" : [ "P2P Rideshare API Product" ],
...
data-into aaaaa %data( myjson : 'case=convert')
%Parser( 'YAJL72/YAJLINTO' );
This fails to load the "api_product_list_json" : [ "P2P Rideshare
Product" ],
...
You said that api_product_list_json has no elements, but your json has
one element for the array.
Since you only have one element, and you have DIM(5) in the data
structure, you would need to either specify option allowmissing=yes, or
better, add a subfield num_api_product_list_json to your data structure,
and specify option countprefix=num.questions.
But if you do actually have an empty array in the json, there was a bug
in DATA-INTO where it didn't handle an empty array. You need 7.2 PTF
SI68422 or 7.3 PTF SI68421 to fix that.
--
Barbara
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(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
link:
Help support midrange.com by shopping at amazon.com with our affiliate
https://amazon.midrange.comservice.
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud
For more information please visit http://www.symanteccloud.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.