The Xcode plugin outputs JSON formatted as a property of the model: Esjsonformat-xcode, output JSON formatted as properties of the model
Written before the note
The value of the key in JSON corresponds to NULL if it is formatted as NSString type
Before formatting, place your cursor where you need to add properties
Rootclass need to be created manually, plug-in only responsible for rootclass inside the property generation
Objectclassinarray method (class method) in the generated Mjextension 2.0 framework
How to install:
Mode 1: Download-xcode open-command+b-restart Xcode
Mode 2: Install via Alcatraz, search Esjsonformat
Mode 3: Download-Unzip plugin folder in Zip to ~/library/application support/developer/shared/xcode/plug-ins-restart Xcode
How to use:
window-esjsonformat-input Json-enter OR shortcut key (control+shift+j)-Enter Json-enter
Function Description:
-0.1
Generating corresponding properties from a JSON string
Generate to. m files through file writes
Support for entering nested model names
-0.2
-0.3
Support for generating Objectclassinarray methods in Mjextension framework
Fixed array nesting multi-level, the inside sub-array can not be formatted bug
Alcatraz
Effect:
Simple model
Complex models
The JSON format in the diagram
{'name ': ' Harry ', 'gender ': ' man ', ' age ': ' height ': ' 140cm ',}
{ "Name ":"Harry", "Gender ":"Man", "Age ":15, "Height ":"140cm", "Addr ":{ "Province ":"Fujian", "City ":"Quanzhou", "Code ":"300000"}, "Hobby ": [{"name ": " Billiards ","Code ": " 1 "}, {" name ": " Computergame ","Code ": " 2 "}]}
iOS plug-in details---esjsonformat-xcode----to output JSON formatted as a property of the model