quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

Using web interface creates swift Codable with type Int for 0.0 value

Open OlKir opened this issue 1 year ago • 0 comments

Steps to reproduce:

  1. Open https://app.quicktype.io/
  2. Enter this JSON as the model:
{
 "double_value": 0.0      
}
  1. 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

OlKir avatar Mar 01 '23 12:03 OlKir