Documentation
¶
Index ¶
- Variables
- type EntryType
- type JEntry
- func (j *JEntry) AddToArray(je ...*JEntry) error
- func (j *JEntry) AddToMap(key string, je *JEntry) error
- func (j *JEntry) AssureArray() error
- func (j *JEntry) AssureMap() error
- func (j *JEntry) AssureString() error
- func (j *JEntry) GetArray() []*JEntry
- func (j *JEntry) GetMap() map[string]*JEntry
- func (j *JEntry) GetString() string
- func (j *JEntry) GetSubElem(name string, key map[string]string, create bool, nextKeys map[string]string, ...) (*JEntry, error)
- func (j *JEntry) GetSubElemMap(name string, key map[string]string, create bool, nextKeys map[string]string, ...) (*JEntry, error)
- func (j *JEntry) GetType() EntryType
- func (j *JEntry) IsArray() bool
- func (j *JEntry) IsMap() bool
- func (j *JEntry) IsString() bool
- func (j *JEntry) MarshalJSON() ([]byte, error)
- func (j *JEntry) String() string
- type JsonBuilder
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type JEntry ¶
type JEntry struct {
// contains filtered or unexported fields
}
func NewJEntryArray ¶
NewJEntryArray initializes as Array typed JEntry
func NewJEntryMap ¶
NewJEntryMap initializes as Map typed JEntry
func NewJEntryString ¶
NewJEntryString initializes as String typed JEntry
func (*JEntry) AddToArray ¶
AddArrayEntry adds the given JEntry to the Array returns an error if this JEntry is not of the type ETArray
func (*JEntry) AddToMap ¶
AddMapEntry adds the given JEntry to the Map returns an error if this JEntry is not of the type ETArray
func (*JEntry) AssureArray ¶
AssureArray returns an error if this JEntry is not of type ETArray
func (*JEntry) AssureString ¶
AssureString returns an error if this JEntry is not of type ETString
func (*JEntry) GetSubElem ¶
func (*JEntry) GetSubElemMap ¶
func (*JEntry) MarshalJSON ¶
MarshalJSON custom marshaller, that returns the JEntry in the correct form (Array, Map or String value)
type JsonBuilder ¶
type JsonBuilder struct {
// contains filtered or unexported fields
}
func NewJsonBuilder ¶
func NewJsonBuilder() *JsonBuilder
func (*JsonBuilder) GetDoc ¶
func (jb *JsonBuilder) GetDoc() ([]byte, error)
func (*JsonBuilder) GetDocIndent ¶
func (jb *JsonBuilder) GetDocIndent() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.