sublimetext_indentxml icon indicating copy to clipboard operation
sublimetext_indentxml copied to clipboard

JSON without string quotes

Open prateekdonni opened this issue 12 years ago • 2 comments

@alek-sys I have been trying to use indent JSON function for getting the JSON formatted, however looks like it only understands : {"key": value} format. I would want to extend this to be able to handle: {key: value }. Most of the cases, people might be using the JSON as follows rather than the the quoted string format. Does this seem to be in scope for this ?

I would like to contribute.

prateekdonni avatar Apr 07 '14 17:04 prateekdonni

Technically, that's not JSON. JSON requires all keys to be quoted. I guess the plugin could be extended to handle JavaScript Literal Objects, which is what you're talking about, but that would definitely be more work, since they can have embedded functions. (Chris)

On Mon, Apr 7, 2014 at 10:01 AM, prateekdonni [email protected]:

@alek-sys https://github.com/alek-sys I have been trying to use indent JSON function for getting the JSON formatted, however looks like it only understands : {"key": value} format. I would want to extend this to be able to handle: {key: value }. Most of the cases, people might be using the JSON as follows rather than the the quoted string format. Does this seem to be in scope for this ?

I would like to contribute.

Reply to this email directly or view it on GitHubhttps://github.com/alek-sys/sublimetext_indentxml/issues/55 .

TheChrisPratt avatar Apr 07 '14 17:04 TheChrisPratt

@TheChrisPratt . :+1: yeah, We have JS literal objects which are used quite a bit in places. I am going to fork and hack around and give it a shot.

prateekdonni avatar Apr 07 '14 17:04 prateekdonni