Skip to content

Fix JSON encoder bug that produces invalid JSON

David Wicksell requested to merge github/fork/dlwicksell/master into master

A previous fix to the JSON encoder, produced invalid JSON. The unit test for that fix looked like this:

D ASSERT(t2(1),"{[{""n"":123,""s"":1},{""N1"":true,""N2"":""true""}]}")

It is invalid because a JSON object cannot contain data, such as an array, without the data value being stored under a key. This pull request improves the previous fix, discussed at:

https://groups.google.com/d/msg/comp.lang.mumps/RcogxQKtkJw/lN7AzAVzBAAJ

It does not, however, attempt to fix any other potential bugs in the JSON processor code.

Merge request reports