Versions in this module Expand all Collapse all v1 v1.8.4 Jan 21, 2019 Changes in this version + func DecodeSimpleValuesAsMap(b ...bool) v1.8.3 Oct 23, 2018 v1.8.2 Sep 14, 2018 Changes in this version + var KeyNotExistError = errors.New("Key does not exist") + var PathNotExistError = errors.New("Path does not exist") type Map + func (mv Map) ValueForKey(key string, subkeys ...string) (interface{}, error) v1.8.1 Jul 26, 2018 Changes in this version type Map + func NewMapGob(gobj []byte) (Map, error) + func (mv Map) Gob() ([]byte, error) v1.6.2 Mar 23, 2018 v1.6.1 Jun 20, 2017 Changes in this version + const Cast + const DefaultElementTag + const DefaultRootTag + const NoAttributes + const SafeEncoding + var CustomDecoder *xml.Decoder + var JsonUseNumber bool + var NO_ROOT = NoRoot + var NoRoot = errors.New("no root key") + 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 CoerceKeysToLower(b ...bool) + func CoerceKeysToSnakeCase(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 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) bool + 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) 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) XmlIndentWriterRaw(xmlWriter io.Writer, prefix, indent string, rootTag ...string) ([]byte, error) + func (mv Map) XmlSeq(rootTag ...string) ([]byte, error) + func (mv Map) XmlSeqIndent(prefix, indent string, rootTag ...string) ([]byte, error) + func (mv Map) XmlSeqIndentWriter(xmlWriter io.Writer, prefix, indent string, rootTag ...string) error + func (mv Map) XmlSeqIndentWriterRaw(xmlWriter io.Writer, prefix, indent string, rootTag ...string) ([]byte, error) + func (mv Map) XmlSeqWriter(xmlWriter io.Writer, rootTag ...string) error + func (mv Map) XmlSeqWriterRaw(xmlWriter io.Writer, rootTag ...string) ([]byte, error) + func (mv Map) XmlWriter(xmlWriter io.Writer, rootTag ...string) error + func (mv Map) XmlWriterRaw(xmlWriter io.Writer, rootTag ...string) ([]byte, error) + func New() Map + 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) + func NewMapXmlSeq(xmlVal []byte, cast ...bool) (Map, error) + func NewMapXmlSeqReader(xmlReader io.Reader, cast ...bool) (Map, error) + func NewMapXmlSeqReaderRaw(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 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/v2