Skip to content
New issue

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

Provide hints to the generator to overwrite types #45

Open
choiruru opened this issue Nov 30, 2019 · 1 comment
Open

Provide hints to the generator to overwrite types #45

choiruru opened this issue Nov 30, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@choiruru
Copy link

hi @javiercbk ,
Thanks for your awesome project, it is very helpful and saving much time when I want to generate json as dart class model.

But, sometime I found a weird json like this

[
    {
        "volume":123
    },
    {
        "volume":123.5
    },
    {
        "volume":null
    } 
]

it will be awesome if there is an option to cast all int and double as String in your project..
thank you

@javiercbk
Copy link
Owner

Actually the library supports this but the frontend does not. I thought about providing hint to the generator and force it to choose a type even though it was not the one that it had detected.

this should be implemented in the frontend but sadly it is not a trivial amount of work.

@javiercbk javiercbk added the enhancement New feature or request label Dec 13, 2019
@javiercbk javiercbk changed the title Cast int and double as String Provide hints to the generator to overwrite types Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants