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

Define JsonType #577

Open
matusbarabas opened this issue Nov 11, 2018 · 5 comments
Open

Define JsonType #577

matusbarabas opened this issue Nov 11, 2018 · 5 comments

Comments

@matusbarabas
Copy link

Can someone help me how to create new JsonType ? My column in databese has json type value.

@j2labs
Copy link

j2labs commented Nov 11, 2018 via email

@matusbarabas
Copy link
Author

Can you explain more? What type i should use ? My custom or BaseType? and why i have to call to_primitive function?

@j2labs
Copy link

j2labs commented Nov 11, 2018 via email

@matusbarabas
Copy link
Author

class CreateRequest(Model):
    id: IntType = IntType(required=False)
    param: StringType = StringType(validators=[json_validator])

This is model, which I used. So, I have to change StringType to Model like this?

class CreateRequest(Model):
    id: IntType = IntType(required=False)
    param: Model

And where to use json dumps method. It is still not clear for me.

@j2labs
Copy link

j2labs commented Nov 11, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants