Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ocschwar
on Oct 26, 2016
|
parent
|
context
|
favorite
| on:
Parsing JSON is a Minefield
JSON with comments? How about { "object":{ "foo":1,"bar":"New Jersey"} , "_comment": "blah blah blah" }
A bit hackish, but always worked for me.
robert_tweed
on Oct 26, 2016
[–]
Now add a comment for foo and another one for bar. Also try it when your client throws an exception whenever it encounters invalid keys in object. Or if perhaps it blindly persists or tries to perform some logic using that "data". And so on.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
A bit hackish, but always worked for me.