Help save net neutrality! Learn more.
Close

#20 JSON validator requires space before map value

v1.0_(example)
open
nobody
None
5
2014-01-28
2014-01-28
No

when validating JSON with a .schema file telling, it is a map

with
{"a":"b"} throws an exception: mapping key is expected.
{"a": "b"} is accepted.

IMHO in
kwalify/parser/yaml.rb:
MAPKEY_PATTERN = /([\w.][-\w.:]*?|".?"|'.?'|:\w+|=|<<)[ \t]:\s+/

should really be
MAPKEY_PATTERN = /([\w.][-\w.:]*?|".?"|'.?'|:\w+|=|<<)[ \t]:\s*/

Discussion


Log in to post a comment.