You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling JSON::Validator.fully_validate_schema( {"$schema"=>"http://json-schema.org/draft-03/schema#", "type"=>"object", "properties"=>{}} )
Leads to JSON::ParserError: invalid comment format at line 1, column 1 [parse.c:96]
But the same result even with JSON::Validator.fully_validate_schema( {} )
This is happening because the first arg of MultiJSON.load is "/Users/Smelkov/.rvm/gems/ruby-2.2.3@ege-fcc-ash/gems/json-schema-2.5.2/resources/draft-04.json", not the content of file itself
Unfortunately this is a bug with the :json_common adapter in MultiJson, rather than a problem with json-schema itself. I've raised an issue on the MultiJson repository for it.
A workaround for now would be to not use the :json_common MultiJson adapter (for example, use :json_gem) or not to use MultiJson with json-schema
@rwz has informed me that :json_common isn't an adapter you should be using - perhaps changing the MultiJson adapter for your app will resolve the issue
Calling
JSON::Validator.fully_validate_schema( {"$schema"=>"http://json-schema.org/draft-03/schema#", "type"=>"object", "properties"=>{}} )
Leads to
JSON::ParserError: invalid comment format at line 1, column 1 [parse.c:96]
But the same result even with
JSON::Validator.fully_validate_schema( {} )
This is happening because the first arg of
MultiJSON.load
is"/Users/Smelkov/.rvm/gems/ruby-2.2.3@ege-fcc-ash/gems/json-schema-2.5.2/resources/draft-04.json"
, not the content of file itselfBacktrace:
The text was updated successfully, but these errors were encountered: