Skip to content

javascript版本json自动转换生成对应语言模型类The whc-json-to-class is the javascript plug-in that automatically converts the json string to the corresponding language model class

License

Notifications You must be signed in to change notification settings

netyouli/whc-json-to-class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whc-json-to-class

Build Status Node version License

  • The whc-json-to-class is the javascript plug-in that automatically converts the json string to the corresponding language model class

DEMO

Demo演示

PC版

Require

JavaScript ES6+

Support Languages

WHCParserLanguage.Dart

WHCParserLanguage.Swift

WHCParserLanguage.SwiftClass

WHCParserLanguage.SwiftSexyJson

WHCParserLanguage.SwiftSexyJson

WHCParserLanguage.SwiftSexyJsonClass

WHCParserLanguage.OC

WHCParserLanguage.Java

WHCParserLanguage.CNet

Usage

npm install -g whc-json-to-class

 use whc-json-to-class.js
 use whc-json-to-class.min.js
    ///  例如json生成swift模型类
    ///  For example, json generates the swift model class

    let language = WHCParserLanguage.Swift;
    let json_parser = new WHCJsonParser(language);
    let results = json_parser.startParser(json_str);


    /// results 是数组,如果生成语言为OC那么results[0]为头文件内容      results[1]为实现类内容
    /// Results is an array, and if the generated language is OC then results[0] is the header file content results[1] for the implementation of the class content

Prompt

The json conversion python and kotlin language models are not currently available and have good Suggestions

Licenses

All source code is licensed under the MIT License.

About

javascript版本json自动转换生成对应语言模型类The whc-json-to-class is the javascript plug-in that automatically converts the json string to the corresponding language model class

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published