gojay
gojay copied to clipboard
Problem decoding input if it starts with [
So I have a process that's writing this to a file
[123] - A log message
When I try (and fail) to decode it using gojay like this:
err := dec.DecodeObject(lm)
The returned error is nil but the error in this file on this lines
(dec.err) show that it's an invalid input ("Cannot unmarshal JSON to type '*decoder.LogMessage'")
This generates an error in the error handling code because there's no error returned.