1. 33
  1.  

  2. 1

    This post misses the mark in my opinion. It shows that some specific JSON parsers don’t correctly follow the standard and that some have bugs but that’s hardly surprising. What code was ever perfect and bug free? The article certainly doesn’t show that “parsing JSON is a minefield”.

    1. 5

      To me, something being a “minefield” has connotations of the appearance of safety, but actually contains unexpected danger.

      I think even if the author only showed that there are many popular buggy parsers out there, each buggy in separate ways, I think that would still qualify as being a “minefield”.

      I think the author took it a step further even though, by showing that while parsing issues can indeed happen with bugs, because of some vagueness in the specifications, it seems that even bug free implementations may make different choices about what to do in some of these vague situations, and yet still be considered “correct”.

      1. 4

        Perhaps “Using JSON is a minefield”? Some time ago I tried using json as a serialization format. And unexpectedly (at the time) but perhaps expectedly in hindsight, encountered a variety of errors because the chosen library could not parse its own output! It was easier for me to switch formats entirely than dig around in the library and fix the issue. After all, a second/third implementation of the protocol would likely use a second and theird json library, and I deduced that each would likely have their own problems.

        I initially picked json because it seemed like a simple format, so how hard can it be? Apparently kinda hard.