Why would a JSON file be GBs in size? I think that's the more interesting question.
Parsing malformed JSON
31–40 of 57 posts
Re: Parsing malformed JSON
#32Earlier quoted context omitted.
I've written a relatively popular Atom/RSS feed parser for Go [0]. I struggled with this very issue but I ultimately ended up attempting to be robust against out-of-spec feeds. A super strict feed parsing library is less useful than one that can successfully parse certain classes of broken feeds. It is a fine line to walk -- I won't add a great deal of complexity to support overly broken feeds, but if it is relativel…
Nothing new under the sun: http://www.xml.com/pub/a/2003/01/22/dive-into-xml.html
I found it interesting, if you look in the thread you'll see that this was a big disagreement between Pilgrim and Aaron Swartz.
Re: Parsing malformed JSON
#33Re: Parsing malformed JSON
#34Re: Parsing malformed JSON
#35This reminds me "Parsing JSON is a minefield" post a few weeks ago, TL;DR, JSON is not standardized or (having multiple standards) making parsing / validating JSON data very tricky in edge cases. https://news.ycombinator.com/item?id=12796556
Re: Parsing malformed JSON
#36Earlier quoted context omitted.
I've written a relatively popular Atom/RSS feed parser for Go [0]. I struggled with this very issue but I ultimately ended up attempting to be robust against out-of-spec feeds. A super strict feed parsing library is less useful than one that can successfully parse certain classes of broken feeds. It is a fine line to walk -- I won't add a great deal of complexity to support overly broken feeds, but if it is relativel…
I'm doing this with WebDAV too. When I come across a bug that's clearly an implementation problem I weigh how prevalent the software is, how likely they will be able to fix it and if possible I add a user-agent specific workaround so new clients can't rely on the same bug with my server.
Re: Parsing malformed JSON
#37This reminds me "Parsing JSON is a minefield" post a few weeks ago, TL;DR, JSON is not standardized or (having multiple standards) making parsing / validating JSON data very tricky in edge cases. https://news.ycombinator.com/item?id=12796556
What are the multiple standards of JSON? I am only aware of one standard; it is the implementations that are the problem.
Re: Parsing malformed JSON
#38Re: Parsing malformed JSON
#39JSON should have a nicer way of dealing with double quotes in data. That would avoid many encoding mistakes.
So you update the standard to this nicer way of dealing with double quotes, and now people forget to indicate whether they're using the nice new way or the ugly old way, or they mix the two approaches ….
Re: Parsing malformed JSON
#40This reminds me "Parsing JSON is a minefield" post a few weeks ago, TL;DR, JSON is not standardized or (having multiple standards) making parsing / validating JSON data very tricky in edge cases. https://news.ycombinator.com/item?id=12796556