Skip to content

how to Preserving key order by json parse ? #129

Description

@leeonsoft

package main

import (
"fmt"
"github.com/Jeffail/gabs"
)

func main() {
jsonStr := {"b":"dddd","a":"111"}
d, _ := gabs.ParseJSON([]byte(jsonStr))
fmt.Println(d.String())
}
// output {"a":"111","b":"dddd"} how to get result : {"b":"dddd","a":"111"} ???

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions