On 25/10/2017 6:55 PM, Windt, W.K.F. van der (Fred) wrote:
We also stumbled upon a serious flaw in the JSON parser: you cannot parse any
JSON that may contain attributes that can occur on different levels under the
same object: for example:
{"a":1,"A":{"a":2,"b":3}}
If you try to look up the value for "a" in the main object the parser will return either 1 (for
the attribute a in the root object) or if the root does not contain attribute a value 2 (for the attribute
>in object A). Without any indication which attribute was found. There is now way to indicate that you
want to look for an attribute directly under an object. We reported this to IBM. They >acknowledged that
it is not possible to correctly parse these JSON streams but that the parser was "working as
designed" and that we should register an RFE. We did that a few months ago but >have not heard any
on that.
OMG! That's a shocker. The API is basically broken as designed! Is your
application CICS/COBOL?
Our applications are a mix of batch programs and CICS and IMS transactions. We
had hoped the toolkit would enable us to build (sub)programs that could be
invoked by applications running in any of those environments. No such luck.
With regards to the JSON Parser. We are already using the z/OS XML System
Services in our applications. Wouldn't it just be a great idea if IBM provided
z/OS JSON System Services with the same interface and events as the XML System
Services? Then clients could switch from XML to JSON by simply changing the
call to system services. No other changes needed. I discussed this at SHARE
Atlanta with members of the IBM team that developed the JSON parser. They saw
no merit in this idea whatsoever. It seems to me that IBM simply has no idea
what their clients want or need.
Great design! Would you consider a vendor solution?
Fred!
-----------------------------------------------------------------
ATTENTION:
The information in this e-mail is confidential and only meant for the intended
recipient. If you are not the intended recipient, don't use or disclose it in
any way. Please let the sender know and delete the message immediately.
-----------------------------------------------------------------
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN