A data in single quotes then fails as valid JSON.
I guess JSON is passed to uglifyjs as JS and there it's understood as a variable (Array/Object)
where '"' is valid, but not in JSON.
There is an old discussion:
mishoo/UglifyJS#156
Seems like there is no interest in adding the support. But it's old and now I see:
-p, --parse <options> ...
`expression` Parse a single expression, rather than
a program (for parsing JSON).
`spidermonkey` Assume input files are SpiderMonkey
AST format (as JSON).
but I didn't look further.
The thing is, that the standard JSON.stringify works really good.
JSON.stringify(Sites, null, "\t")
outputs a nice beautified JSON.
Would you thing about adding an option to minjson and subsequently to Sublime Editor to use JSON instead of UglifyJS for minjson?
Thanks
A data in single quotes then fails as valid JSON.
I guess JSON is passed to uglifyjs as JS and there it's understood as a variable (Array/Object)
where
'"'is valid, but not in JSON.There is an old discussion:
mishoo/UglifyJS#156
Seems like there is no interest in adding the support. But it's old and now I see:
but I didn't look further.
The thing is, that the standard JSON.stringify works really good.
JSON.stringify(Sites, null, "\t")outputs a nice beautified JSON.
Would you thing about adding an option to minjson and subsequently to Sublime Editor to use JSON instead of UglifyJS for minjson?
Thanks