quicktype
quicktype copied to clipboard
Using web interface creates swift Codable with type Int for 0.0 value
Steps to reproduce:
- Open https://app.quicktype.io/
- Enter this JSON as the model:
{
"double_value": 0.0
}
- Generated codable:
struct CustomModel: Codable {
let doubleValue: Int
enum CodingKeys: String, CodingKey {
case doubleValue = "double_value"
}
}
I would expect to get:
let doubleValue: Double
and it works correctly when value is different from 0.0