Back to blog

Paste JSON as code in Xcode and Visual Studio

quicktype is now available for Xcode, Visual Studio, and Visual Studio Code. There are many ways to use quicktype; the quicktype.io web app is the most powerful UI, works offline, and doesn't require installation.

quicktype is now available for Xcode, Visual Studio, and Visual Studio Code. There are many ways to use quicktype; the quicktype.io web app is the most powerful UI, works offline, and doesn't require installation.

VS Code Extension

Install from the VS Code marketplace:

  1. Open VS Code
  2. Go to Extensions (Cmd+Shift+X)
  3. Search for "Paste JSON as Code"
  4. Install and reload

Usage:

  1. Copy JSON to clipboard
  2. Open Command Palette (Cmd+Shift+P)
  3. Run "Paste JSON as Code"
  4. Enter a top-level type name

Xcode Extension

For Swift and Objective-C developers:

  1. Download quicktype for Xcode from the Mac App Store
  2. Enable the extension in System Preferences → Extensions → Xcode Source Editor
  3. Copy JSON to clipboard
  4. In Xcode: Editor → quicktype → Paste JSON as Code

Visual Studio Extension

For C# developers:

  1. Go to Extensions → Manage Extensions
  2. Search for "quicktype"
  3. Install and restart Visual Studio
  4. Right-click in editor → Paste JSON as Classes

Benefits

  • Never manually write JSON parsing code again
  • Stay in your IDE workflow
  • Instant type-safe code from any JSON
  • Works offline