Parsing Error When Converting JSON String to an Object (Release 6.91)

A bug has been discovered in release 6.91 of HostBridge when attempting to convert a JSON string to an object in an HB.js script.

When specifying the following sample code in a script:

var a = '{ "A" : [ "one", "two" ] }';

The following error will incorrectly occur:

parse EXCEPTION : Error: Missing a comma or ']' after an array element.

This is due to an error in how HostBridge processes the ] key when converting a JSON string to an object. 

This issue can be fixed with the following patch to program HBR$DJSN: u210309a.xmt

To implement the patch, you should do the following:

  • Upload the patch to your mainframe in BINARY format.  
  • Use the TSO RECEIVE command to create a load library containing module HBR$DJSN.  (For further information about the TSO RECEIVE command, click here.)
  • Include the created library in your CICS startup deck ahead of your HostBridge v691 library.
  • Do one of the following:
    • If running HostBridge in a non zIIP enviroment, NEW COPY module HBR$DJSN.
    • If you are running HB for zIIPO, use the transaction HBZT RECY,xxx (where xxx is the suffix of your HostBridge zIIP manager) to refresh the zIIP infrastructure.
    • Recycle the affected region(s).

Please contact HostBridge Support if you have any questions.