Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONString ¶
func JSONString(j OJsonObject) string
JSONString ... returns a formatted string representation of an ordered JSON
Types ¶
type OJsonKeyValuePair ¶
type OJsonKeyValuePair struct { Key string Value OJsonObject }
OJsonKeyValuePair ... since this ir ordered JSON, maps are really ordered lists of key value pairs, this class
type OJsonList ¶
type OJsonList []OJsonObject
OJsonList ... JSON list
func (*OJsonList) AsList ¶
func (j *OJsonList) AsList() []OJsonObject
AsList ... returns it represented as a slice of objects
type OJsonMap ¶
type OJsonMap struct { KeySet map[string]bool OrderedKV []*OJsonKeyValuePair }
OJsonMap ... ordered map, actually a list of key value pairs
func (*OJsonMap) Put ¶
func (j *OJsonMap) Put(key string, value OJsonObject)
Put ... put into map. Nothing if key exists in map
func (*OJsonMap) RefreshKeySet ¶
func (j *OJsonMap) RefreshKeySet()
RefreshKeySet ... recreate the key set from the key value pairs
type OJsonObject ¶
type OJsonObject interface {
// contains filtered or unexported methods
}
OJsonObject ... ordered JSON tree object interface
func ParseOrderedJSON ¶
func ParseOrderedJSON(input []byte) (OJsonObject, error)
ParseOrderedJSON ... parses JSON preserving order in maps
Click to show internal directories.
Click to hide internal directories.