On 2019-01-10 1:34 AM, Don Brown wrote:
I am hoping someone can advise how I need to create the data structure of
DATA-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 API
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.

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.


This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].