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