Closed martin-sucha closed 2 years ago
simdjson is for objects or arrays.
It doesn't make sense to use for single values anyway.
simdjson is for objects or arrays.
Okay. Please add it to the docs then, I have opened a pull request for that.
It doesn't make sense to use for single values anyway.
Depends on the use case. For example, my use case is computing a diff of two JSON values. In my case the two values are two huge objects, so I don't need the plain values right now. However, it is not a big leap to imagine arbitrary json values might be useful in that kind of tool.
According to json specification, plain
null
,true
,false
,10
,"string"
are all valid JSON documents, but simdjson-go fails with an error when parsing them:I would expect simdjson-go to parse those simple values like all other parsers do or at least to see a mention in the documentation.