Gratis · Ontwikkeling
JSON naar Swift Codable.
Zet een JSON-voorbeeld om in Swift Codable-structs met CodingKeys voor snake_case-sleutels, optionals en geneste types.
Loading the calculator…
Zo gebruik je deze tool: JSON naar Swift Codable
Voer gegevens in of kies een bestand. Pas de instellingen aan, maak het resultaat en controleer het voordat je het kopieert of downloadt.
Limieten en ondersteunde formaten
Je invoer wordt op je apparaat verwerkt.
Technische opmerkingen in het Engels
Types are inferred from the sample only. Everything is calculated in your browser; nothing you type is uploaded.
Integers map to Int, decimals to Double, arrays to [T]; optional or null fields become optionals. A small JSONValue enum is added when a field’s type varies.
user_name becomes let userName: String with case userName = "user_name" in CodingKeys.