Gratis · Desarrollo
JSON a Swift Codable.
Convierte un ejemplo JSON en structs Swift Codable con CodingKeys para claves en snake_case, opcionales y tipos anidados.
Loading the calculator…
Cómo usar esta herramienta: JSON a Swift Codable
Introduce los datos o selecciona el archivo. Ajusta las opciones, genera el resultado y revísalo antes de copiarlo o descargarlo.
Límites y formatos compatibles
Los datos se procesan en tu dispositivo.
Notas técnicas en inglés
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.