json2csv
json2csv copied to clipboard
Not preserve keys order
It seems like the tool can't preserve JSON keys order.
was searching for that as well. any updates on this? btw thanks for the tool!
It's hard to preserve keys order because of Golang constraint. Golang's map structure type is non-ordered.
I found a helpful package called orderedset it's helped me a lot with this problem, maybe you could see the source and apply the same logic here.
EDIT And another called orderedmap who provides json encoding
See also my own package github.com/dolmen-go/jsonmap which provides an ordered map for JSON.