We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Scientific notation in json converts to str in model:
class Model(BaseModel): hello: str
To Reproduce
Example json:
{ "hello": 1e-9 }
Used commandline:
$ datamodel-codegen --input-file-type json --input gen/test-meta.json --output gen/test_scientific_notation.py
Expected behavior Expected float.
Version:
The text was updated successfully, but these errors were encountered:
default
number
str
No branches or pull requests
Describe the bug
Scientific notation in json converts to str in model:
To Reproduce
Example json:
Used commandline:
Expected behavior
Expected float.
Version:
The text was updated successfully, but these errors were encountered: