Skip to content

jeeinn/bejson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bejson

Format and beautify json strings through pure js

Usage

Browser

<script src="../src/bejson.js"></script>
...
<script>
    var old_json = '{"a":"a","b":[1,2],"c":{"c1":"cc","c2":123}}';
    var json = bejson(old_json, {debug:true});
    console.log(json);
</script>

----- output -----


{
    "a": "a",
    "b": [
        1,
        2
    ],
    "c": {
        "c1": "cc",
        "c2": 123
    }
}

Node

npm install bejson

About

Format and beautify json strings through pure js

Resources

License

Stars

Watchers

Forks

Packages

No packages published