× 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.



And if you need a second opinion jsonlint.com is where I check my JSON. Mark is correct. jsonlint.com highlights that missing ":"

Pete Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java
LinkedIn - www.linkedin.com/in/petehelgren
Twitter - Sys_i_Geek IBM_i_Geek

On 8/16/2016 11:35 AM, Mark Murphy/STAR BASE Consulting Inc. wrote:
Far as I can tell, the problem is with the first MeasureUnit. It does not have a colon(:) between the tag and the value. (That is, after I remove the asterisks (*)).

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx


-----Jan Grove Vejlstrup <jgv@xxxxxxxx> wrote: -----
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
From: Jan Grove Vejlstrup <jgv@xxxxxxxx>
Date: 08/16/2016 10:37AM
Subject: JSON Parsing Problem


Hello

I am using yajl in the version from Scott Klement to parse JSON. But I
have a problem with this one:
{
"SalesOrderNo":"000001",
"PackageQuantity":1.0,
"PalletQuantity":0.0,
"Weight":3.44,
"SalesOrderState":40,
"SalesOrderItems":
[
{
"PositionsNo":"1",
"ItemNo":"31200200",
*"MeasureUnit"{"UnitDesc":"St�ck","UnitDescShort":"Stk","UnitCode":"01","UnitItemCount":1.0,"DecimalCount":0},*
"ItemDescription":"Granito 1 Sahara",
"SortNo":1,
"TotalQuantity":11.0,
"QuantityPicked":11.0,
"StorageLocation":"A0201 03",
"IsFloorItem":true
},
{
"PositionsNo":"2",
"ItemNo":"31200201",
*"MeasureUnit":{"UnitDesc":"Multipack","UnitDescShort":"Pack","UnitCode":"02","UnitItemCount":5.0,"DecimalCount":0},*
"ItemDescription":"Granito 2 Sahara",
"SortNo":2,
"TotalQuantity":12.0,
"QuantityPicked":12.0,
"StorageLocation":"A0201 04",
"IsFloorItem":false
}
]
}

My problem is with the two nodes, that I have put to bold. How can I
handle those with yajl?

Best regards

Jan



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.