quicktype
quicktype copied to clipboard
Python JSON generation
Hello,
I ran into an issue with the generation of the class code. The generator indicated a field value of 0.0 as an int instead of a float.
I was able to add a new function: def from_float(x: Any) -> float: assert isinstance(x, float) return x
After adding this to the generated code and it worked just fine afterward!
Thanks for making this, saved me a lot of time and it is really well done.