Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Does ramses support JSON data type? #112

Open
geohuz opened this issue Apr 27, 2016 · 2 comments
Open

Does ramses support JSON data type? #112

geohuz opened this issue Apr 27, 2016 · 2 comments

Comments

@geohuz
Copy link

geohuz commented Apr 27, 2016

As for new sqlalchemy supports JSON data type, I'm wondering if ramses supports this type. A quick test shows an error:

/ramses/models.py", line 212, in handle_model_generation
    raise ValueError('{}: {}'.format(model_name, str(ex)))
ValueError: User: Unknown type: json

in my schema file I have:

    "data": {
      "type": ["string", "null"],
      "_db_settings": {
        "type": "json",
        "required": false
      }
    }
@geohuz
Copy link
Author

geohuz commented Nov 28, 2016

I'm wondering anybody and help this issue?

@jstoiko
Copy link
Member

jstoiko commented Nov 28, 2016

I think "dict" is probably the closest type to "json".

you can get a complete list of supported type here: http://ramses.readthedocs.io/en/stable/fields.html#types

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

No branches or pull requests

2 participants