Package jsonmap provides tools to serialize a map as JSON using a given order for keys.
jsonmap
Use the following type to wrap any map[string]interface{}:
map[string]interface{}
type Ordered struct { Order []string // Order of keys Data map[string]interface{} }