I always thought that seemed like a nice alternative data format to JSON. Anyone using this it in the wild?
Parsing JSON is a Minefield
61–70 of 301 posts
Re: Parsing JSON is a Minefield
#62Anyone else seeing forbidden? Forbidden You don't have permission to access to this document on this server.
Now I turned the PHP page into a static HTML one.
Configuring web servers is a minefield :)
Re: Parsing JSON is a Minefield
#63Earlier quoted context omitted.
> (b) it's an OK choice though I really think it's not an OK choice. A config file format that doesn't allow comments provides some of the worst possible UX. One of the nice things about config files is that normally they are self-documenting, explaining the meaning of the various directives and providing possible values. Without comments, you have to constantly switch between the documentation and the config file. A…
How does json "not support comments"? {"comment":"default values for this object"}
Re: Parsing JSON is a Minefield
#64Re: Parsing JSON is a Minefield
#65Re: Parsing JSON is a Minefield
#66The page has been taken down for some reason (getting a 403). Google cache: http://webcache.googleusercontent.com/search?q=cache:8jVuBmx...
Works for me. Edit: But you are not alone. Elsewhere in the thread: https://news.ycombinator.com/item?id=12797032
Re: Parsing JSON is a Minefield
#67The page has been taken down for some reason (getting a 403). Google cache: http://webcache.googleusercontent.com/search?q=cache:8jVuBmx...
Now I turned the PHP page into a static HTML one and it's back online.
Configuring web servers is a minefield :)
Re: Parsing JSON is a Minefield
#68Re: Parsing JSON is a Minefield
#69> In conclusion, JSON is not a data format you can rely on blindly. That was definitely not my take-away from the article. More like "JSON is not a data format you can rely on blindly if you are using an esoteric edge-case and/or an alpha-stage parsing library." I haven't ever run into a single JSON issue that wasn't due to my own fat fingers or trying to serialize data that would have been better suited to something…
The sum totality of all the issues raised in that post is not an esoteric edge case, even if each individual element is an esoteric edge case. If you haven't encountered any of them in your real code yet, there's two basic possibilities. Either you aren't using JSON very hard at all... or you have encountered them and you just didn't realize it. You will, sooner or later. I'm not saying JSON is bad. Personally I thin…
Re: Parsing JSON is a Minefield
#70Well, first and most obviously, if you are thinking of rolling your own JSON parser, stop and seek medical attention. Secondly, assume that parsing your input will crash, so catch the error and have your application fail gracefully. This is the number one security issue I encounter in "security audited" PHP. (The second being the "==" vs. "===" debacle that is PHP comparison.) As one example, consider what happens wh…
A parser should never crash on bad input. If it does, that's a serious bug that needs immediate attention, since that's at least a DoS vulnerability and quite likely something that could result in remote code execution. You definitely need to assume that the parser could fail , but that's different. Unless you're using "crash" in some way I'm not familiar with?