|
On Jan 12, 2019, at 6:21 PM, Don Brown <DBrown@xxxxxxxxxx> wrote:thing.
Sorry for continuing this discussion but I am still not getting one
I
Here is a very simple example using just a part of the json string that
am working with.acceptance
(Unfortunately this is not just test data - it is from the user
testing environment
and represents exactly what we will get in the live environment!!)
Here is the json;
myjson = '{ +
"refresh_token_expires_in" : "0", +
"api_product_list" : "[P2P Rideshare API Product]",
}'
And the data structure that now works for that json string
dcl-ds aaaaa qualified;
refresh_token_expires_in varchar(10);
num_api_product_list int(5) ;
api_product_list varchar(50) dim(5);
...
end-ds;
Why do I need a count ( num_api_product_list int(5) ) for the
"api_product_list"
As you said in your previous response "[P2P Rideshare API Product]" IS
NOT an array
because the square brackets are inside the double quotes.
In case I have oversimplified or by omitting the full json string and/or
data structure i have includedservice.
again below.
dcl-ds aaaaa qualified;
refresh_token_expires_in varchar(10);
num_api_product_list int(5) ;
api_product_list varchar(50) dim(5);
num_api_product_list_json int(5) ;
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;
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" +
}';
Don Brown
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud
For more information please visit http://www.symanteccloud.commailing list
______________________________________________________________________
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxxquestions.
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: https://amazon.midrange.com
Help support midrange.com by shopping at amazon.com with our affiliate
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.