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.