Skip to content

victornpb/jsonify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

jsonify

carbon

Convert Javascript Object literals to JSON

Single quotes? Unquoted properties? Trailing commas? Comments?

Just turn this:

/* Javascript object */
{
  foo: 'bar', // comment
  'hello': `world`, // trailing comma?
}

Into this:

{
    "foo": "bar",
    "hello": "world"
}