cabo / cddlc

CDDL conversion utilities
6 stars 2 forks source link

nil is not a legal json value #2

Open bremoran opened 2 years ago

bremoran commented 2 years ago

The output of cddlc includes nil, which is not a legal value in JSON. The correct output value for these instances is null.

cabo commented 1 year ago

Indeed, if you don't specify an output format, you get Ruby format. For JSON output use -tjson (or -tneat, which selects a specific JSON formatter -- I might add others later). For CDDL output use -tcddl.