yaml / yaml-test-suite

Comprehensive, language independent Test Suite for YAML
MIT License
172 stars 58 forks source link

Replace empty strings with nulls in JSON where actual value is !!null #24

Closed eemeli closed 6 years ago

eemeli commented 6 years ago

A couple of the examples that are based on YAML 1.2 spec examples represent !!null "" values in JSON as "" when they really should be null.

perlpunk commented 6 years ago

Thanks. Unfortunately, both contained null keys, and it isn't really defined how they should be converted to strings ("", "null", ...), so I deleted in-json from both.

eemeli commented 6 years ago

In that case would it make more sense to split these test into two parts each, one of which contains null keys and the other with null values only?

perlpunk commented 6 years ago

Yeah, that would make sense. In general, the spec examples are testing too much features at the same time, IMHO, although keeping the spec examples themselves is maybe a good idea too.