Versions in this module Expand all Collapse all v0 v0.2.0 Aug 2, 2023 Changes in this version + func Convert(r io.Reader, ps ...plugin) (*bytes.Buffer, error) + func ExcludeAttributes(attrs []string) *excluder + func NodePlugin(path string, plugin nodePlugin) nodeFormatter + func ToArray() *arrayFormatter + func WithAttrPrefix(prefix string) *attrPrefixer + func WithContentPrefix(prefix string) *contentPrefixer + func WithNodes(n ...nodeFormatter) *nodesFormatter + func WithTypeConverter(ts ...JSType) *customTypeConverter + type Decoder struct + func NewDecoder(r io.Reader, plugins ...plugin) *Decoder + func (dec *Decoder) AddFormatters(formatters []nodeFormatter) + func (dec *Decoder) Decode(root *Node) error + func (dec *Decoder) DecodeWithCustomPrefixes(root *Node, contentPrefix string, attributePrefix string) error + func (dec *Decoder) ExcludeAttributes(attrs []string) + func (dec *Decoder) SetAttributePrefix(prefix string) + func (dec *Decoder) SetContentPrefix(prefix string) + type Encoder struct + func NewEncoder(w io.Writer, plugins ...plugin) *Encoder + func (enc *Encoder) Encode(root *Node) error + type JSType int + const Bool + const Float + const Int + const Null + const String + func Str2JSType(s string) JSType + type Node struct + Children map[string]Nodes + ChildrenAlwaysAsArray bool + Data string + func (n *Node) AddChild(s string, c *Node) + func (n *Node) GetChild(path string) *Node + func (n *Node) IsComplex() bool + type Nodes []*Node