Versions in this module Expand all Collapse all v2 v2.7.0 Feb 10, 2023 Changes in this version + func SetGlobalKeyMapPrefix(s string) type MapSeq + func NewMapFormattedXmlSeq(xmlVal []byte, cast ...bool) (MapSeq, error) v2.5.7 Aug 2, 2022 v2.5.6 Jun 3, 2022 v2.5.5 Mar 9, 2021 v2.5.4 Mar 8, 2021 v2.5.3 Feb 17, 2021 v2.5.2 Feb 4, 2021 v2.5.1 Feb 2, 2021 Changes in this version + func XMLEscapeCharsDecoder(b ...bool) + func XmlCheckIsValid(b ...bool) v2.3.2 Oct 28, 2020 Changes in this version + const Cast + const DefaultElementTag + const DefaultRootTag + const NoAttributes + const SafeEncoding + var CustomDecoder *xml.Decoder + var JsonUseNumber bool + var KeyNotExistError = errors.New("Key does not exist") + var NO_ROOT = NoRoot + var NoRoot = errors.New("no root key") + var PathNotExistError = errors.New("Path does not exist") + var XmlCharsetReader func(charset string, input io.Reader) (io.Reader, error) + func AnyXml(v interface{}, tags ...string) ([]byte, error) + func AnyXmlIndent(v interface{}, prefix, indent string, tags ...string) ([]byte, error) + func BeautifyXml(b []byte, prefix, indent string) ([]byte, error) + func CastNanInf(b ...bool) + func CastValuesToBool(b ...bool) + func CastValuesToFloat(b ...bool) + func CastValuesToInt(b ...bool) + func CoerceKeysToLower(b ...bool) + func CoerceKeysToSnakeCase(b ...bool) + func DecodeSimpleValuesAsMap(b ...bool) + func DisableTrimWhiteSpace(b ...bool) + func HandleJsonReader(jsonReader io.Reader, mapHandler func(Map) bool, errHandler func(error) bool) error + func HandleJsonReaderRaw(jsonReader io.Reader, mapHandler func(Map, []byte) bool, ...) error + func HandleXMPPStreamTag(b ...bool) + func HandleXmlReader(xmlReader io.Reader, mapHandler func(Map) bool, errHandler func(error) bool) error + func HandleXmlReaderRaw(xmlReader io.Reader, mapHandler func(Map, []byte) bool, ...) error + func IncludeTagSeqNum(b ...bool) + func LeafUseDotNotation(b ...bool) + func PrependAttrWithHyphen(v bool) + func SetArraySize(size int) int + func SetAttrPrefix(s string) + func SetCheckTagToSkipFunc(fn func(string) bool) + func SetFieldSeparator(s ...string) + func XMLEscapeChars(b bool) + func XmlDefaultEmptyElemSyntax() + func XmlGoEmptyElemSyntax() + type LeafNode struct + Path string + Value interface{} + type Map map[string]interface + func (mv Map) Attributes(path string) ([]string, error) + func (mv Map) Copy() (Map, error) + func (mv Map) Elements(path string) ([]string, error) + func (mv Map) Exists(path string, subkeys ...string) (bool, error) + func (mv Map) Gob() ([]byte, error) + func (mv Map) Json(safeEncoding ...bool) ([]byte, error) + func (mv Map) JsonIndent(prefix, indent string, safeEncoding ...bool) ([]byte, error) + func (mv Map) JsonIndentWriter(jsonWriter io.Writer, prefix, indent string, safeEncoding ...bool) error + func (mv Map) JsonIndentWriterRaw(jsonWriter io.Writer, prefix, indent string, safeEncoding ...bool) ([]byte, error) + func (mv Map) JsonWriter(jsonWriter io.Writer, safeEncoding ...bool) error + func (mv Map) JsonWriterRaw(jsonWriter io.Writer, safeEncoding ...bool) ([]byte, error) + func (mv Map) LeafNodes(no_attr ...bool) []LeafNode + func (mv Map) LeafPaths(no_attr ...bool) []string + func (mv Map) LeafValues(no_attr ...bool) []interface{} + func (mv Map) NewMap(keypairs ...string) (Map, error) + func (mv Map) Old() map[string]interface{} + func (mv Map) PathForKeyShortest(key string) string + func (mv Map) PathsForKey(key string) []string + func (mv Map) Remove(path string) error + func (mv Map) RenameKey(path string, newName string) error + func (mv Map) Root() (string, error) + func (mv Map) SetValueForPath(value interface{}, path string) error + func (mv Map) StringIndent(offset ...int) string + func (mv Map) StringIndentNoTypeInfo(offset ...int) string + func (mv Map) Struct(structPtr interface{}) error + func (mv Map) UpdateValuesForPath(newVal interface{}, path string, subkeys ...string) (int, error) + func (mv Map) ValueForKey(key string, subkeys ...string) (interface{}, error) + func (mv Map) ValueForPath(path string) (interface{}, error) + func (mv Map) ValueForPathString(path string) (string, error) + func (mv Map) ValueOrEmptyForPathString(path string) string + func (mv Map) ValuesForKey(key string, subkeys ...string) ([]interface{}, error) + func (mv Map) ValuesForPath(path string, subkeys ...string) ([]interface{}, error) + func (mv Map) Xml(rootTag ...string) ([]byte, error) + func (mv Map) XmlIndent(prefix, indent string, rootTag ...string) ([]byte, error) + func (mv Map) XmlIndentWriter(xmlWriter io.Writer, prefix, indent string, rootTag ...string) error + func (mv Map) XmlWriter(xmlWriter io.Writer, rootTag ...string) error + func New() Map + func NewMapGob(gobj []byte) (Map, error) + func NewMapJson(jsonVal []byte) (Map, error) + func NewMapJsonReader(jsonReader io.Reader) (Map, error) + func NewMapJsonReaderRaw(jsonReader io.Reader) (Map, []byte, error) + func NewMapStruct(structVal interface{}) (Map, error) + func NewMapXml(xmlVal []byte, cast ...bool) (Map, error) + func NewMapXmlReader(xmlReader io.Reader, cast ...bool) (Map, error) + func NewMapXmlReaderRaw(xmlReader io.Reader, cast ...bool) (Map, []byte, error) + type MapRaw struct + M Map + R []byte + func NewMapsFromJsonFileRaw(name string) ([]MapRaw, error) + func NewMapsFromXmlFileRaw(name string) ([]MapRaw, error) + type MapSeq map[string]interface + func (msv MapSeq) StringIndent(offset ...int) string + func (msv MapSeq) StringIndentNoTypeInfo(offset ...int) string + func (mv MapSeq) Xml(rootTag ...string) ([]byte, error) + func (mv MapSeq) XmlIndent(prefix, indent string, rootTag ...string) ([]byte, error) + func (mv MapSeq) XmlIndentWriter(xmlWriter io.Writer, prefix, indent string, rootTag ...string) error + func (mv MapSeq) XmlWriter(xmlWriter io.Writer, rootTag ...string) error + func NewMapXmlSeq(xmlVal []byte, cast ...bool) (MapSeq, error) + func NewMapXmlSeqReader(xmlReader io.Reader, cast ...bool) (MapSeq, error) + func NewMapXmlSeqReaderRaw(xmlReader io.Reader, cast ...bool) (MapSeq, []byte, error) + type Maps []Map + func NewMaps() Maps + func NewMapsFromJsonFile(name string) (Maps, error) + func NewMapsFromXmlFile(name string) (Maps, error) + func (mvs Maps) JsonFile(file string, safeEncoding ...bool) error + func (mvs Maps) JsonFileIndent(file, prefix, indent string, safeEncoding ...bool) error + func (mvs Maps) JsonString(safeEncoding ...bool) (string, error) + func (mvs Maps) JsonStringIndent(prefix, indent string, safeEncoding ...bool) (string, error) + func (mvs Maps) XmlFile(file string) error + func (mvs Maps) XmlFileIndent(file, prefix, indent string) error + func (mvs Maps) XmlString() (string, error) + func (mvs Maps) XmlStringIndent(prefix, indent string) (string, error) Other modules containing this package github.com/clbanning/mxj