iOS plug-in details---esjsonformat-xcode----to output JSON formatted as a property of the model

Source: Internet
Author: User

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

    • Support for Swift

    • Fixed a blank line when the value of JSON is NULL when it is empty

    • fix bool Type value formatting failure problem

-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
    • Support Alcatraz, please search Esjsonformat

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.