Documentation
¶
Index ¶
- func Convert(from json.RawMessage, to any) error
- func EmptyArrayRawMessage() json.RawMessage
- func EmptyObjectRawMessage() json.RawMessage
- func Extract(str string) (string, error)
- func IsEmptyRawMessage(data json.RawMessage) bool
- func ToJson(i interface{}, defaultValue string) string
- func ToPrettyJson(i interface{}) string
- func ToRawMessage(i interface{}, defaultValue string) (json.RawMessage, error)
- type ParseFinder
- type Parser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEmptyRawMessage ¶
func IsEmptyRawMessage(data json.RawMessage) bool
IsEmptyRawMessage 验证数据是否为空
func ToPrettyJson ¶
func ToPrettyJson(i interface{}) string
func ToRawMessage ¶
func ToRawMessage(i interface{}, defaultValue string) (json.RawMessage, error)
Types ¶
type ParseFinder ¶
type ParseFinder Parser
func (ParseFinder) Bool ¶
func (pf ParseFinder) Bool() bool
func (ParseFinder) Float32 ¶
func (pf ParseFinder) Float32() float32
func (ParseFinder) Float64 ¶
func (pf ParseFinder) Float64() float64
func (ParseFinder) Int ¶
func (pf ParseFinder) Int() int
func (ParseFinder) Int64 ¶
func (pf ParseFinder) Int64() int64
func (ParseFinder) Interface ¶
func (pf ParseFinder) Interface() interface{}
func (ParseFinder) String ¶
func (pf ParseFinder) String() string
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) Find ¶
func (p *Parser) Find(path string, defaultValue ...interface{}) *ParseFinder
func (*Parser) LoadString ¶
Click to show internal directories.
Click to hide internal directories.