{"_id":"@euxn23/quicktype","_rev":"4-8d078142a1557dba4606de1c4159fa3e","time":{"0.0.1-alpha.1":"2019-04-05T12:59:50.587Z","created":"2019-04-05T13:06:10.995Z","15.0.177-patch.1":"2019-04-05T13:06:11.369Z","modified":"2022-04-05T08:30:10.258Z"},"name":"@euxn23/quicktype","dist-tags":{"latest":"15.0.177-patch.1"},"versions":{"15.0.177-patch.1":{"name":"@euxn23/quicktype","version":"15.0.177-patch.1","license":"Apache-2.0","main":"dist/cli/index.js","types":"dist/cli/index.d.ts","repository":{"type":"git","url":"git+https://github.com/quicktype/quicktype.git"},"scripts":{"pub":"script/publish.sh","prepare":"npm run build","build":"script/build.ts","test":"jest && script/test","start":"script/watch","pkg":"script/make-pkgs.sh","tslint":"tslint --project src/cli --exclude 'src/__tests__/**' --exclude 'src/cli/get-stream/**'","clean":"rm -rf dist node_modules *~"},"dependencies":{"chalk":"^2.4.1","collection-utils":"^1.0.1","command-line-args":"^4.0.6","command-line-usage":"^5.0.5","graphql":"^0.11.7","is-url":"^1.2.4","js-base64":"^2.4.3","lodash":"^4.17.10","moment":"^2.22.1","node-fetch":"^1.7.1","pako":"^1.0.6","pluralize":"^7.0.0","stream-json":"1.1.3","string-to-stream":"^1.1.0","@mark.probst/typescript-json-schema":"~0.32.0","@mark.probst/unicode-properties":"~1.1.0","urijs":"^1.19.1","uuid":"^3.2.1","wordwrap":"^1.0.0"},"devDependencies":{"@types/urijs":"github:quicktype/types-urijs","@types/is-url":"^1.2.28","@types/jest":"^23.1.6","@types/lodash":"^4.14.108","@types/node":"^8.10.10","@types/shelljs":"^0.7.8","@types/semver":"^5.5.0","ajv":"^5.5.2","deep-equal":"^1.0.1","elm":"0.18.0-exp5","exit":"^0.1.2","flow-bin":"^0.66.0","flow-remove-types":"^1.2.3","jest":"^23.1.0","promise-timeout":"^1.3.0","semver":"^5.5.0","shelljs":"^0.7.8","ts-jest":"^23.1.3","ts-node":"^3.3.0","tslint":"^5.11.0","typescript":"~3.2.1","uglify-js":"^3.3.22","watch":"^1.0.2","@types/graphql":"^0.11.7","@types/js-base64":"^2.3.1","@types/pako":"^1.0.0","@types/pluralize":"0.0.28"},"bin":{"quicktype":"dist/cli/index.js"},"jest":{"transform":{"^.+\\.tsx?$":"ts-jest"},"globals":{"ts-jest":{"tsConfigFile":"src/cli/tsconfig.json"}},"testRegex":"(/__tests__/.*)\\.test\\.(tsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"gitHead":"3171fb4c622cdc0f95cbdf73a510f78f43d4a9fe","description":"![](https://raw.githubusercontent.com/quicktype/quicktype/master/quicktype-logo.svg?sanitize=true)","bugs":{"url":"https://github.com/quicktype/quicktype/issues"},"homepage":"https://github.com/quicktype/quicktype#readme","_id":"@euxn23/quicktype@15.0.177-patch.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"euxn23","email":"euxn23@gmail.com"},"dist":{"integrity":"sha512-sO3fEl4GJGHShGT/v86gdWBGjHmjYyeB1lnjJN/31lpmgxOeMb2Rynjp6HCoZmEs3rYL/pn1jPWIrkzq/CcUkQ==","shasum":"7e03747c583127aaaa9a31596c4dc8fe4bacd137","tarball":"https://registry.npmjs.org/@euxn23/quicktype/-/quicktype-15.0.177-patch.1.tgz","fileCount":167,"unpackedSize":1691049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp1LDCRA9TVsSAnZWagAAOT0P/iPEualBs9OnzigGIz+U\nGadhlb5mhUAWow4Qn7mG9b1exhSypNwKLgJprRWE7EPQOhzLvKVvpiIaU+O4\nJOkWzOU3YJqZKdrYI9VMYcwsDYKe4cMnNM3yGMEEvBJRoZhxrGhz1f+/iOm0\nutZcUOqj8Bq0atftbkpHJ3YlfAiEQJW1w0rbXtDZbFhloS2NOddCQiNSFK6n\nw/NDnikqw8/+EBqorOrOXd4nrtljTQxd5Yy3tpQUvIp50dH4sfty0cA+1hbS\nwCvmodZWZhmMFxE0NxGVkFpptSBu55v5P36xQ0H3KBg6fEghQA4bUlF3/ja9\nRCE0e+0Gm8x8MLoZlY/p8SuiQjQ0wdsN2QCO9Wy+PHm6SI2h2ko0SMJZTI9U\nwBZKyxLQh73kr/tLP1fUD3fRyX1KlGQEtFjJJh3Bs8K7XxEBAvPWVxciA//X\nCcqn4f3ItiS7YSWIeeOupdTy2mxksUUegAzYM2jTDfHfFys9E6dJdwwic6mQ\n3eHK8vBYk90Ht5DKebFvme4+iYggLv1HBk6cPEMr3i0DuRwXts1/rpne+ETY\nFQ6tR739FSSlg5Ar8bX/8Fw9nZegdmuobDqoBdT3rLftpfLt9CIOk5dlBROo\nEjV08WogWdX4rbjKyS7SWlM0Y6MW+qyIGJ+Xl958DMHwXZYEwlBUPiYLBSNi\nWZoC\r\n=iORl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHm+6Osh/Ki3ppxoaH4x3WvFpAmnEpJfCtfq1uP1rcZQIgG/T46cih+4qLmrTIsicI6VgX2a4agoJXjDJMye5Zx7w="}]},"maintainers":[{"name":"euxn23","email":"euxn23@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quicktype_15.0.177-patch.1_1554469571188_0.679721270043729"},"_hasShrinkwrap":false}},"maintainers":[{"name":"euxn23","email":"euxn23@gmail.com"}],"description":"![](https://raw.githubusercontent.com/quicktype/quicktype/master/quicktype-logo.svg?sanitize=true)","homepage":"https://github.com/quicktype/quicktype#readme","repository":{"type":"git","url":"git+https://github.com/quicktype/quicktype.git"},"bugs":{"url":"https://github.com/quicktype/quicktype/issues"},"license":"Apache-2.0","readme":"![](https://raw.githubusercontent.com/quicktype/quicktype/master/quicktype-logo.svg?sanitize=true)\n\n[![npm version](https://badge.fury.io/js/quicktype.svg)](https://badge.fury.io/js/quicktype)\n[![Build status](https://badge.buildkite.com/147309f9f492c2af1ea53df922be7140ba4035dbb31f61ee1e.svg)](https://buildkite.com/typeguard/quicktype-master)\n[![Join us in Slack](http://slack.quicktype.io/badge.svg)](http://slack.quicktype.io/)\n\n`quicktype` generates strongly-typed models and serializers from JSON, JSON Schema, and [GraphQL queries](https://blog.quicktype.io/graphql-with-quicktype/), making it a breeze to work with JSON type-safely in any programming language.\n\n-   [Try `quicktype` in your browser](https://app.quicktype.io).\n-   View [awesome JSON APIs](https://github.com/typeguard/awesome-typed-datasets) that have been strongly typed with `quicktype`.\n-   Read ['A first look at quicktype'](http://blog.quicktype.io/first-look/) for more introduction.\n-   If you have any questions, check out the [FAQ](FAQ.md) first.\n\n### Supported Inputs\n\n| JSON | JSON API URLs | [JSON Schema](https://app.quicktype.io/#s=coordinate) |\n| ---- | ------------- | ----------------------------------------------------- |\n\n\n| TypeScript | GraphQL queries |\n| ---------- | --------------- |\n\n\n### Target Languages\n\n| [Ruby](https://app.quicktype.io/#l=ruby) | [JavaScript](https://app.quicktype.io/#l=js) | [Flow](https://app.quicktype.io/#l=flow) | [Rust](https://app.quicktype.io/#l=rust) | [Kotlin](https://app.quicktype.io/#l=kotlin) | [Dart](https://app.quicktype.io/#l=dart) |\n| ---------------------------------------- | -------------------------------------------- | ---------------------------------------- | ---------------------------------------- | -------------------------------------------- | ---------------------------------------- |\n\n\n| [Python](https://app.quicktype.io/#l=python) | [C#](https://app.quicktype.io/#l=cs) | [Go](https://app.quicktype.io/#l=go) | [C++](https://app.quicktype.io/#l=cpp) | [Java](https://app.quicktype.io/#l=java) | [TypeScript](https://app.quicktype.io/#l=ts) |\n| -------------------------------------------- | ------------------------------------ | ------------------------------------ | -------------------------------------- | ---------------------------------------- | -------------------------------------------- |\n\n\n| [Swift](https://app.quicktype.io/#l=swift) | [Objective-C](https://app.quicktype.io/#l=objc) | [Elm](https://app.quicktype.io/#l=elm) | [JSON Schema](https://app.quicktype.io/#l=schema) | [Pike](https://app.quicktype.io/#l=pike) |\n| ------------------------------------------ | ----------------------------------------------- | -------------------------------------- | ------------------------------------------------- | ------------------------------------------------- |\n\n\n_Missing your favorite language? Please implement it!_\n\n## Installation\n\nThere are many ways to use `quicktype`. [app.quicktype.io](https://app.quicktype.io) is the most powerful and complete UI. The web app also works offline and doesn't send your sample data over the Internet, so paste away!\n\nFor the best CLI, we recommend installing `quicktype` globally via `npm`:\n\n```bash\nnpm install -g quicktype\n```\n\nOther options:\n\n-   [Homebrew](http://formulae.brew.sh/formula/quicktype) _(infrequently updated)_\n-   [Xcode extension](https://itunes.apple.com/us/app/paste-json-as-code-quicktype/id1330801220?mt=12)\\*\n-   [VSCode extension](https://marketplace.visualstudio.com/items/quicktype.quicktype)\\*\n-   [Visual Studio extension](https://marketplace.visualstudio.com/items?itemName=typeguard.quicktype-vs)\\*\n\n<small>\\* limited functionality</small>\n\n## Using `quicktype`\n\n```bash\n# Run quicktype without arguments for help and options\nquicktype\n\n# quicktype a simple JSON object in C#\necho '{ \"name\": \"David\" }' | quicktype -l csharp\n\n# quicktype a top-level array and save as Go source\necho '[1, 2, 3]' | quicktype -o ints.go\n\n# quicktype a sample JSON file in Swift\nquicktype person.json -o Person.swift\n\n# A verbose way to do the same thing\nquicktype \\\n  --src person.json \\\n  --src-lang json \\\n  --lang swift \\\n  --top-level Person \\\n  --out Person.swift\n\n# quicktype a directory of samples as a C++ program\n# Suppose ./blockchain is a directory with files:\n#   latest-block.json transactions.json marketcap.json\nquicktype ./blockchain -o blockchain-api.cpp\n\n# quicktype a live JSON API as a Java program\nquicktype https://api.somewhere.com/data -o Data.java\n```\n\n### Generating code from JSON schema\n\nThe recommended way to use `quicktype` is to generate a JSON schema from sample data, review and edit the schema, commit the schema to your project repo, then generate code from the schema as part of your build process:\n\n```bash\n# First, infer a JSON schema from a sample.\nquicktype pokedex.json -l schema -o schema.json\n\n# Review the schema, make changes,\n# and commit it to your project repo.\n\n# Finally, generate model code from schema in your\n# build process for whatever languages you need:\nquicktype -s schema schema.json -o src/ios/models.swift\nquicktype -s schema schema.json -o src/android/Models.java\nquicktype -s schema schema.json -o src/nodejs/Models.ts\n\n# All of these models will serialize to and from the same\n# JSON, so different programs in your stack can communicate\n# seamlessly.\n```\n\n### Generating code from TypeScript (Experimental)\n\nYou can achieve a similar result by writing or generating a [TypeScript](http://www.typescriptlang.org/) file, then quicktyping it. TypeScript is a typed superset of JavaScript with simple, succinct syntax for defining types:\n\n```typescript\ninterface Person {\n    name: string;\n    nickname?: string; // an optional property\n    luckyNumber: number;\n}\n```\n\nYou can use TypeScript just like JSON schema was used in the last example:\n\n```bash\n# First, infer a TypeScript file from a sample (or just write one!)\nquicktype pokedex.json -o pokedex.ts --just-types\n# Review the TypeScript, make changes, etc.\nquicktype pokedex.ts -o src/ios/models.swift\n```\n\n## Contributing\n\n`quicktype` is [Open Source](LICENSE) and we love contributors! In fact, we have a [list of issues](https://github.com/quicktype/quicktype/issues?utf8=✓&q=is%3Aissue+is%3Aopen+label%3Ahelp-wanted) that are low-priority for us, but for which we'd happily accept contributions. Support for new target languages is also strongly desired. If you'd like to contribute, need help with anything at all, or would just like to talk things over, come [join us on Slack](http://slack.quicktype.io).\n\n### Setup, Build, Run\n\n`quicktype` is implemented in TypeScript and requires `nodejs` and `npm` to build and run.\n\nFirst, install `typescript` globally via `npm`:\n\nClone this repo and do:\n\n#### macOS / Linux\n\n```bash\nnpm install\nscript/quicktype # rebuild (slow) and run (fast)\n```\n\n#### Windows\n\n```bash\nnpm install --ignore-scripts # Install dependencies\nnpm install -g typescript # Install typescript globally\ntsc --project src/cli # Rebuild\nnode dist\\cli\\index.js # Run\n```\n\n### Edit\n\nInstall [Visual Studio Code](https://code.visualstudio.com/), open this\nworkspace, and install the recommended extensions:\n\n```bash\ncode . # opens in VS Code\n```\n\n### Live-reloading for quick feedback\n\nWhen working on an output language, you'll want to view generated\noutput as you edit. Use `npm start` to watch for changes and\nrecompile and rerun `quicktype` for live feedback. For example, if you're\ndeveloping a new renderer for `fortran`, you could use the following command to\nrebuild and reinvoke `quicktype` as you implement your renderer:\n\n```bash\nnpm start -- \"--lang fortran pokedex.json\"\n```\n\nThe command in quotes is passed to `quicktype`, so you can render local `.json`\nfiles, URLs, or add other options.\n\n### Test\n\n`quicktype` has many complex test dependencies:\n\n-   `crystal` compiler\n-   `dotnetcore` SDK\n-   Java, Maven\n-   `elm` tools\n-   `g++` C++ compiler\n-   `golang` stack\n-   `swift` compiler\n-   `clang` and Objective-C Foundation (must be tested separately on macOS)\n-   `rust` tools\n-   `pike` interpreter\n-   [Bundler](https://bundler.io) for Ruby\n\nWe've assembled all of these tools in a Docker container that you build and test within:\n\n```bash\n# Build and attach to Docker container\nscript/dev\n\n# Run full test suite\nnpm run test\n\n# Test a specific language (see test/languages.ts)\nFIXTURE=golang npm test\n\n# Test a single sample or directory\nFIXTURE=swift npm test -- pokedex.json\nFIXTURE=swift npm test -- test/inputs/json/samples\n```\n","readmeFilename":"README.md"}