Skip to content
This repository has been archived by the owner on Jan 22, 2018. It is now read-only.
Hsu Ting edited this page Nov 17, 2015 · 8 revisions

unit

unit is a difficult argument. As a result, I open a new page to Explain this. For example, I have a input file like this.

[
  {
    "num": "0",
    "text": {
      "name": "title", 
      "num": {
        "no": "0",
        "test": "1"
      }
    }
  }
]

If you set unit: { num: {} }, The program will find this to be a unit.

"num": {
  "no": "0",
  "test": "1"
}

If you set unit: { num: "" }, The program will find this to be a unit.

{
  "num": "0",
  "text": {
    "name": "title", 
    "num": {
      "no": "0",
      "test": "1"
    }
  }
}
  • Program will find the form which is same as unit from top to bottom. and other data will be added to unit final. Other data in same level will be included in unit.
  • unit is for same complex data, so do not be worry about this. You just set one field key on the top level in unit.
Clone this wiki locally