Closed suzaku closed 4 years ago
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities (and 0 Security Hotspots to review)
0 Code Smells
No Coverage information
0.0% Duplication
Never mind. It seems write
depends on the order of keys
and assumes that "timeField" is the first key.
Thanks. Yes, iterate on a golang map will get a shuffled/random order.
So jsonKeys was introduced because internal users ask for "fields should keep orderred" feature on ConsoleWriter
I believe we can do better, because parsing keys only takes longer than decoding the while JSON
just feels wrong. That said, it won't be an easy job unless we use some other JSON
library.
Agreed.
To keeps "No Dependencies" feature, I'm looking for a simplified/bundled JSON
parser like,
I'm considering how to implementing a "only top level" json parser base on their codes.
It turns out the simpler way that just use
json.Unmarshal
is faster than callingDecode
to parse it manually.