Skip to content

zip_json

zhouweixian edited this page Aug 2, 2019 · 2 revisions

zip_json

A simple tool to simplify JSON for json2entity

example

$ zip_json '[{"k1":1, "k2":0},  {"k2": 0, "k3": true}]'
$ [{"k1":1,"k2":0,"k3":true}]
$ zip_json '{
  "root": [
    {
      "a": null,
      "b": 1,
      "c": "OK",
      "d": {
        "e": 0
      },
      "g": [
        {
          "h": 1
        },
        {
          "j": 3
        }
      ]
    },
    {
      "a": true,
      "b": 1,
      "d": {
        "f": 1
      },
      "g": [
        {
          "i": 2
        },
        {
          "k": 4
        }
      ]
    }
  ]
}'
$ {"root":[{"a":true,"b":1,"c":"OK","d":{"e":0,"f":1},"g":[{"h":1,"j":3,"i":2,"k":4}]}]}
Clone this wiki locally