Skip to content

Code generator for JSON serialization and deserialization on iOS and Android based on json schema

Notifications You must be signed in to change notification settings

opentok/json2code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json2code

Convert JSON schemas to code - work with JSON using typed objects in C++, Objective-C, Java and generates validation code for JavaScript.

How to get it running

Use a version of [node.js][node] - v6 or higher. You may want to use [nvm][nvm] if you need multiple versions of node installed.

To install dependencies run:

$ npm install

To generate your first code run

node json2code.js $SCHEMA $PREFIX $PACKAGE

The options:

  • $SCHEMA path to JSON schema file
  • $PREFIX prepended to the class names for Objective-C & Java output
  • $PACAKGE the Java package to generate this code under

You can then find your generated code in the output folder.

Contributing

JavaScript is expected to adhere to the Airbnb style guide. Pull requests will not merge unless:

Please be sure to run npm test before submitting your PR.

About

Code generator for JSON serialization and deserialization on iOS and Android based on json schema

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •