Documentation ¶
Overview ¶
This code was copied from https://gitlab.com/c0b/go-ordered-json/blob/master/ordered.go and then heavily adjusted
Copyright ??
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONTidier ¶
type JSONTidier struct {
// contains filtered or unexported fields
}
the JSONTidier type, has similar operations as the default map, but maintained the keys order of inserted; similar to map, all single key operations (Get/Set/Delete) runs at O(1).
func (*JSONTidier) MarshalJSON ¶
func (jt *JSONTidier) MarshalJSON() ([]byte, error)
this implements type json.Marshaler interface, so can be called in json.Marshal(om)
func (*JSONTidier) TidyString ¶
func (jt *JSONTidier) TidyString(orig string) (string, error)
func (*JSONTidier) UnmarshalJSON ¶
func (jt *JSONTidier) UnmarshalJSON(data []byte) error
this implements type json.Unmarshaler interface, so can be called in json.Unmarshal(data, om)
Click to show internal directories.
Click to hide internal directories.