SetSortMapKeys causes the Encoder to encode map keys in increasing order. Supported map types are: - map[string]string - map[string]bool - map[string]interface{}
(on bool)
| 135 | // - map[string]bool |
| 136 | // - map[string]interface{} |
| 137 | func (e *Encoder) SetSortMapKeys(on bool) *Encoder { |
| 138 | if on { |
| 139 | e.flags |= sortMapKeysFlag |
| 140 | } else { |
| 141 | e.flags &= ^sortMapKeysFlag |
| 142 | } |
| 143 | return e |
| 144 | } |
| 145 | |
| 146 | // SetCustomStructTag causes the Encoder to use a custom struct tag as |
| 147 | // fallback option if there is no msgpack tag. |
no outgoing calls