Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
osullivj
on Jan 25, 2016
|
parent
|
context
|
favorite
| on:
Use JSON files as if they are Python modules
Yes, I keep running into this. I leave trailing commas in my JSON as it evals fine in Python. Then my C++ code, using boost::property_tree chokes on it. property_tree also needs double quotes, not the single quotes in this example.
to3m
on Jan 25, 2016
[–]
There's a module for this: json. The error messages might not be very good, but it does check for trailing commas.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: