Ingy has brought to my attention that Marc Lehmann has written in http://search.cpan.org/dist/JSON-XS/XS.pm#JSON_and_YAML about another incompatibility between JSON and YAML:

> Please note that YAML has hardcoded limits on (simple) object key lengths that JSON doesn't have,
> so you should make sure that your hash keys are noticeably shorter than the 1024 characters YAML allows.

This refers to the 1K key limit YAML uses to avoid unbound lookahead in _block_ context:

--- # Lookahead required to distinguish between:
- "very long key string": value
- "very long non-key string"
...

We can lift this restriction inside flow mappings:

---
{ "always a key without need for lookahead":value }
...

This should complete the changes requires to make YAML 100% compatible with JSON. We hope :-)

I have been remiss updating the spec, but I have done some work cleaning up and debugging the productions (the corrected set is available as part of the YamlReference Haskell package and can also be run using http://dev.yaml.org/ypaste for testing and reporting issues). I will fix these to lift the 1K key limit in flow mappings, and will resume updating the spec to match.

Have fun,

    Oren Ben-Kiki