RebornQ / command-line-tools-nodejs

Some Command Line Tools by NodeJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Command Line Tools by NodeJS

Unescape JSON

It's for converting all JSON strings in JSON to JSON Object or JSON Array.

etc.

{
  "json":  {
    "json-object": {
      "p1": "p1-data"
    },
    "json-array-string": "[ \"data1\", \"data2\" ]",
    "json-object-string": "{ \"param1\": \"1\", \"param2\": \"2\" }"
  } 
}

It can be converted to this:

{
    "json": {
        "json-object": {
            "p1": "p1-data"
        },
        "json-array-string": [
            "data1",
            "data2"
        ],
        "json-object-string": {
            "param1": "1",
            "param2": "2"
        }
    }
}

build

yarn run pkg-unescape-json

Run

yarn run unescape-json

Thanks

About

Some Command Line Tools by NodeJS


Languages

Language:JavaScript 100.0%