Convert JSON to Swift, C#, TypeScript, Objective-C, Go, Java, C++ and more<!-- --> • quicktype

1 min read Original article ↗

$ npm install -g quicktype$ npm install -g quicktype

$ echo '[1, 2, 3.14]' | quicktype --lang go

$ echo '[1, 2, 3.14]' \    | quicktype --lang go

$ quicktype https://blockchain.info/latestblock -o LatestBlock.cs

$ quicktype -o LatestBlock.cs \    https://blockchain.info/latestblock

$ quicktype https://goo.gl/Dq2yKd -o Weather.ts --runtime-typecheck

$ quicktype -o Weather.ts \    --runtime-typecheck \    https://goo.gl/Dq2yKd

$ quicktype types.ts -o Types.cs$ quicktype types.ts -o Types.cs

$ ls spotify-api-samples$ ls spotify-api-samples

album.json artist.json track.json$ quicktype spotify-api-samples -o SpotifyClient.swift

$ quicktype -o SpotifyClient.swift \    spotify-api-samples