voxpupuli / json-schema

Ruby JSON Schema Validator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

possible to enforce schema ?

c0ze opened this issue · comments

I have a JSON field, and I want to make sure some keys are present.

Is it possible to have this schema enforced ? (when I serialize the field with this schema, if key doesnt exist, create with blank value)

I think the insert defaults option is what you want. Please look in the readme