ramses icon indicating copy to clipboard operation
ramses copied to clipboard

Does ramses support JSON data type?

Open geohuz opened this issue 9 years ago • 2 comments

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 avatar Apr 27 '16 07:04 geohuz

I'm wondering anybody and help this issue?

geohuz avatar Nov 28 '16 05:11 geohuz

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

jstoiko avatar Nov 28 '16 18:11 jstoiko