Generate types and converters from JSON, Schema, and GraphQL
Перейти к файлу
David Siegel c232a3584d Remove dist 2017-11-25 07:53:39 +09:00
.vscode Don't search in dist 2017-10-25 11:06:04 -07:00
script Don't compile or require PureScript 2017-11-24 12:42:20 -08:00
src-ts Don't compile or require PureScript 2017-11-24 12:42:20 -08:00
test Remove Swift 3 2017-11-24 12:42:19 -08:00
.dockerignore Remove PureScript sources 2017-11-24 12:42:20 -08:00
.gitignore Ignore the C++ test file 2017-11-08 08:30:04 -08:00
.travis.yml Remove PureScript sources 2017-11-24 12:42:20 -08:00
Dockerfile Install boost on Docker 2017-10-30 07:28:05 -07:00
LICENSE Create LICENSE 2017-08-30 10:49:31 -07:00
README.md Remove dist 2017-11-25 07:53:39 +09:00
contributors.md Remove dist 2017-11-25 07:53:39 +09:00
package-lock.json Bump version 2017-11-02 18:15:07 -07:00
package.json Bump CLI 2017-11-24 12:42:20 -08:00
tslint.json TSLint all our TS code 2017-10-31 13:43:44 -07:00

README.md

Synopsis

$ quicktype [--lang cs|ts|go|java|elm|swift|types|schema] FILE|URL ... 

Description

Given JSON sample data, quicktype outputs code for working with that data in
C#, TypeScript, Go, Java, Elm, Swift, Simple Types, Schema.

Options

-o, --out FILE                                    The output file. Determines --lang and --top-level. 
-t, --top-level NAME                              The name for the top level type.                    
-l, --lang cs|ts|go|java|elm|swift|types|schema   The target language.                                
-s, --src-lang json|schema                        The source language (default is json).              
--src FILE|URL                                    The file or url to type.                            
--src-urls FILE                                   Tracery grammar describing URLs to crawl.           
--no-maps                                         Don't infer maps, always use classes.               
-h, --help                                        Get some help.                                

Options for C#

--namespace NAME                                 Generated namespace 
--csharp-version 6|5                             C# version          
--density normal|dense                           Property density    
--array-type array|list                          Use T[] or List<T>  
--features complete|attributes-only|just-types   Output features     

Options for TypeScript

--just-types yes|no   Plain interfaces only 

Options for Go

--package NAME   Generated package name 

Options for Java

--package NAME        Generated package name 
--just-types yes|no   Plain objects only     

Options for Elm

--module NAME             Generated module name 
--array-type array|list   Use Array or List     

Options for Swift

--swift-version 4|3              Swift version               
--struct-or-class struct|class   Generate structs or classes 
--just-types yes|no              Plain types only            

Examples

Generate C# to parse a Bitcoin API                                
$ quicktype -o LatestBlock.cs https://blockchain.info/latestblock 
                                                                    
Generate Go code from a JSON file                                 
$ quicktype -l go user.json                                       
                                                                    
Generate JSON Schema, then TypeScript                             
$ quicktype -o schema.json https://blockchain.info/latestblock    
$ quicktype -o bitcoin.ts --src-lang schema schema.json           

Learn more at quicktype.io