activerecord json validator code example
Example 1: rails json schema validation
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"properties": {
"city": { "type": "string" },
"country": { "type": "string" }
},
"required": ["country"]
}
Example 2: rails json schema validation
gem 'activerecord_json_validator'