Open Source

ReformatCode Project on GitHub


I have added an open source project to the GitHub.  The project, ReformatCode currently only supports reformatting JSON data to human readable format.  Though I hope in the future it can be extended to support CSS indentation structuring with intelligent parent – child relationship styles.   Formatting CSS can be a little complex if you want it to really show properly how the CSS works with other classes and what is a sub element or sub class of another.  So that would be a possible and welcome addition to the code base in the future if effort is put into it.


ReformatCode Project via GitHub


Passing either a JSON object or string, will reformat the JSON to a human readable level.
Second param (optional) is an object of settings to override defaults.


ReformatCode.formatJSON({"key": {"sub_key": "sub_value"}}, {"indent": "spaces", "debug": true, "newline": "\r"});


{"key": {"sub_key": "sub_value"}


    "key": {
        "sub_key": "sub_value"
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: -1 (from 1 vote)