On 14.06.2020 19:07, Rick McGuire wrote: > There's already code in there to return an empty array. I suspect the problem > is the newline > character before the "[". It is not being recognized as an array item.
That led me look closer to the test data: "Ratings:" [], which is wrong as the colon is *before* the closing quote rather than after it. Correcting it to "Ratings": [], makes it run. So I would take this is to be an error in the JSON data. ---rony > > On Sun, Jun 14, 2020 at 12:57 PM Rony G. Flatscher <rony.flatsc...@wu.ac.at > <mailto:rony.flatsc...@wu.ac.at>> wrote: > > <https://sourceforge.net/p/oorexx/bugs/1709/> reports an error with the > current implementation of > json parsing, supplying a short script and test data demonstrating the > error. > > Researching on the Internet there are various opinions/expectations that > people have, e.g. > > <https://www.google.com/search?client=firefox-b-d&q=json+empty+array+or+null>. > > Personally I would agree with > > <https://stackoverflow.com/questions/9619852/what-is-the-convention-in-json-for-empty-vs-null/9623521>, > i.e. if an array or map is empty, return an empty array resp. empty map > instead of .nil following > the Rexx philosophy of "least surprise". (Json > > What do you think? > > ---rony >
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel