FSharp.Data
FSharp.Data copied to clipboard
json root values
Hi,
It looks like in https://github.com/fsharp/FSharp.Data/issues/563 and its patch https://github.com/fsharp/FSharp.Data/pull/594 the root value of a Json text was restricted to just objects and arrays, based on this comment suggesting that both jsonlint and the spec do not support general values at the root.
As far as I can tell this was based on a state of affairs that has subsequently changed, specifically RFC 4627 from 2006 in which such a restriction held.
Subsequently this restriction was removed, and non-object-and-array values (eg. null, true, false) are all allowed at root. RFC7195 in 2014 and RFC8259 in 2017 and ECMA-404 from 2017 and the revised grammar on json.org and jsonlint all agree on this point presently.
(I'm not just being a pedant here -- I have an application that produces such values and this parser breaks on it)
Opened PR #1262 above.