|
I have data structure set up, and able to execute YAJLINTO, but no values
in DS and no errors.
V7R5
The json is here, have clipped out many other columns to make shorter (and
there may be 1 item or many but in this case json has 1 set of values)
{"items": [ {
"firstName":".",
"lastName":"CESAR GLASS AND CONSTRUCTION",
"email":"CGC78@xxxxxxxxxx",
"shippingAddress":
{
"countryDisplay":null,
"stateDisplay":null,
"line1":null,
"line2":null,
"city":null,
"country":null,
"state":null,
"zip":null
},
"paymentMethods":[],
"createdOn":"2024-11-17T19:08:30.601Z",
"modifiedOn":null,
"id":"97bb28db-a8f5-42a7-929b-b22b013b729d"
}
],
"total":1}
i'm sure my DS not right,( and left out of DS shippingAddress,
paymentMethods, and total as not needed in this pgm).. but perhaps that's
the issue of not defining the complex parts of this json?
I've searched archives, Scott's online docs and posts, but not found a
similar json example.
* define work fields
D xOut S 5000
* define data structure for json results
D items DS qualified dim(99)
D num_list 10i 0
D firstName 50
D lastName 50
D email 100
D id 64
data-into items
%DATA(xOut
: 'case=any allowextra=yes allowmissing=yes countprefix=num_')
%PARSER('YAJLINTO');
degug shows only num_list has a value
ITEMS.NUM_LIST(1) = 1077952576 and same value in all 99 buckets of array
I do have several other YAJLINTO programs working ok with same vendor, but
this is first with an "items" json.
TIA
Jim Franz
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.