You are reading content from Scuttlebutt
@cryptix %sAFqnoYgwIJh6LUmv0PQyTQmrfTSdMC8zhZs0lk231g=.sha256
Re: %ZOosXgUtS

I made this test to check it, and yess. It produces the output you expected.

func ExampleEncode() {
    b := []byte(`{"!":2,"66[[":2,"6[[":2,"":3,"0[al|":3,"6[":2,"6":266}`)
    out, err := EncodePreserveOrder(b)
    fmt.Println("Err:", err)
    fmt.Println(string(out))
    // Output: Err: <nil>
    //{
    //   "!": 2,
    //   "66[[": 2,
    //   "6[[": 2,
    //   "": 3,
    //   "0[al|": 3,
    //   "6[": 2,
    //   "6": 266
    // }

}

but like keks said, we made an encoder specifically to preserve order.

Join Scuttlebutt now