On 25/10/2017 4:22 PM, Windt, W.K.F. van der (Fred) wrote:
Did you mean REXX the "lame" horse?:)  Only joking! I was reading
about the new "z/OS client web enablement toolkit" which comes with a
REXX API for HTTP requests and a JSON
  > 
serializer/parserhttps://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.ieac100/ieac1-cwe-json.htm.
It's great that IBM are writing APIs like this to enable languages
with limited capabilities to do modern stuff, but I couldn't help thinking 
that's a lot of faffing around calling multiple services just to yank some data 
from from a JSON string.  It's interesting to compare that approach to other 
scripting languages that run just fine on z/OShttp://groovy-lang.org/json.html.
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?

Needless to say that we are not very impressed with these new features.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to