× 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 am hoping someone can advise how I need to create the data structure of
DATA-INTO with this json string.

You will notice the api_product list is NOT an array as the square
brackets are inside the quoted string.

But the following line api_product_list_json is an array but it has no
elements ?

This is being passed by an outside organisation and I have no control over

the formatting - I just have to work with it.

I have loaded this string into a varchar myjson

{
"refresh_token_expires_in" : "0",
"api_product_list" : "[P2P Rideshare API Product]",
"api_product_list_json" : [ "P2P Rideshare API Product" ],
"organization_name" : "onegov",
"developer.email" : "sam@xxxxxxxxx",
"token_type" : "BearerToken",
"issued_at" : "1547071634302",
"client_id" : "WmTFrOi8ZXBa0RBn6Tx2vYd3dnkOgtjj",
"access_token" : "ePpNwfSoCUosyHpqQJlcK3zAjHeG",
"application_name" : "2d8ee44d-5621-459a-8e44-7946c8d319dd",
"scope" : "",
"expires_in" : "43199",
"refresh_count" : "0",
"status" : "approved"
}

My data structure is as follows;

dcl-ds aaaaa;
refresh_token_expires_in varchar(10);
api_product_list varchar(50) ;
api_product_list_json varchar(50) dim(5);
organization_name varchar(50);
developer_email varchar(50);
token_type varchar(50);
issued_at varchar(20);
client_id varchar(50);
access_token varchar(50);
application_name varchar(50);
scope varchar(50);
expires_in varchar(10);
refresh_count varchar(10);
status varchar(20);
end-ds;

data-into aaaaa %data( myjson : 'case=convert')
%Parser( 'YAJL72/YAJLINTO' );

This fails to load the "api_product_list_json" : [ "P2P Rideshare API
Product" ],

If I remove this from the data structure and the myjson string the
data-into completes and all data structure values are correct.

I have verified and the json string is a valid json string.

Don Brown


Don Brown

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.