Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't know specifically about Sublime Text 2, but from my own experience writing a configuration library which accepts JSON as an input, you usually strip out those comments before feeding the resulting content to your appropriate json_decode function.

1- Read the contents of your JSON file.

2- Strip out the comments with some regex foo or such.

3 - Feed the remaining contents to your JSON parser.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: