JSON input
Paste JSON, optionally name the root type, then generate.
Your Scala case class code will appear here.
Turn JSON into Scala case classes. Immutable models with inferred types, Option fields, List collections, and nested classes in one line each.
Paste JSON, optionally name the root type, then generate.
Your Scala case class code will appear here.
Scala models data as immutable values, and case classes are the vehicle. The generator converts each JSON object level into a case class with Option for uncertainty and List for collections.
Because case classes support destructuring, the generated models work naturally in match expressions, which is how Scala code usually consumes parsed JSON.