Formattatori e Codice
JSON a Scala Case Class
Scala case classes for Circe / Play JSON.
Nota dell'editore
Understanding · Case classes and typeclass derivation.
Questo capitolo approfondito è attualmente disponibile solo in inglese. Lo strumento di conversione qui sopra funziona nella tua lingua; il lungo articolo esplicativo non è stato ancora tradotto.
Domande frequenti
Quick answers.
›Which Scala versions are supported?
The output follows standard Scala 2.13 and Scala 3 syntax for case classes. It uses standard collection types like `List` or `Seq` and optional fields where appropriate.
›Does it support Circe or Play JSON?
Yes. It generates the base case class structure which can then be used with `deriveDecoder` in Circe or `Json.format` in Play JSON. Key names are preserved to match the source JSON.
›How does it handle nested objects?
The converter recursively identifies nested structures and generates separate, linked case classes for every object found within the payload.
›Is my data sent to any external API?
No. The parsing and code generation logic runs entirely within your browser environment. Your JSON structure never leaves your device.
Le persone cercano anche
Strumenti correlati
More in this room.
- JSON in interfaccia TypeScriptDeduzione dei tipi da un campione JSON ed emissione di interfacce TS.
- JSON in classe C#Genera classi POCO da un campione JSON.
- JSON in Java POJOEmette un POJO Java da un campione JSON.
- JSON in Python DataclassDataclass con suggerimenti di tipo (con Pydantic opzionale) da JSON.
- JSON in Go StructStrutture Go idiomatiche con tag `json:`.
- JSON in Kotlin Data ClassClassi di dati concise per qualsiasi campione JSON.