glideapps / glideapps/quicktype
Using web interface creates swift Codable with type Int for 0.0 value
Open
bug
Python
rendering
Swift
- Dominant language
- TypeScript
- Stars
- 13.9k
- Forks
- 1.2k
- Avg merge
- 8h 53m
- Merged PRs (30d)
- 369
Description
### Steps to reproduce:
1. Open https://app.quicktype.io/
2. Enter this JSON as the model:
```
{
"double_value": 0.0
}
```
3. 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`
Contributor guide
Assessment
This issue has not been assessed yet.