Versions in this module Expand all Collapse all v1 v1.0.0 Apr 3, 2024 Changes in this version + func TrimNonGraphic(s string) string + type Converter struct + func NewConverter(plugins ...Plugin) Converter + func (s Converter) Convert(r io.Reader) (*bytes.Buffer, error) + type Decoder struct + func NewDecoder(reader io.Reader, plugins ...Plugin) *Decoder + 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(writer 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 + Data string + Label string + func (n *Node) AddChild(s string, c *Node) + func (n *Node) GetChild(path string) *Node + func (n *Node) IsComplex() bool + type Nodes []*Node + type Plugin interface + AddToDecoder func(*Decoder) *Decoder + AddToEncoder func(*Encoder) *Encoder + func AllAttrToArray() Plugin + func AttrToArray(attrList ...string) Plugin + func ExcludeAttributes(attrs ...string) Plugin + func WithAttrPrefix(prefix string) Plugin + func WithContentPrefix(prefix string) Plugin + func WithTypeConverter(ts ...JSType) Plugin