Open andykoch opened 1 year ago
I dug into the source and discovered the string was getting JSON.parse() called on it, which returns integer 123. To address that I appended a to_json.
JSON::Validator.fully_validate({type: "string"}, "123".to_json)
"123".to_json
returns "\"123\""
I would expect a string that is just a number to pass validation as a string.
When I use the same schema and value in a third party validator, it passes fine.
According to the json schema specs: https://json-schema.org/understanding-json-schema/reference/string.html#string