Documentation ¶
Index ¶
- Constants
- Variables
- func Marshal(v interface{}) ([]byte, error)
- func NewEncoder(w io.Writer) *jsoniter.Encoder
- func Unmarshal(v []byte, d interface{}) error
- type JSONValue
- func (obj *JSONValue) IsNull(keys ...string) (bool, error)
- func (obj *JSONValue) Peek(keys ...string) (interface{}, error)
- func (obj *JSONValue) PeekBool(keys ...string) (bool, error)
- func (obj *JSONValue) PeekBoolDefault(def bool, keys ...string) bool
- func (obj *JSONValue) PeekDefault(def interface{}, keys ...string) interface{}
- func (obj *JSONValue) PeekFloat(keys ...string) (float64, error)
- func (obj *JSONValue) PeekFloatDefault(def float64, keys ...string) float64
- func (obj *JSONValue) PeekInt(keys ...string) (int64, error)
- func (obj *JSONValue) PeekIntDefault(def int64, keys ...string) int64
- func (obj *JSONValue) PeekMap(keys ...string) (map[string]interface{}, error)
- func (obj *JSONValue) PeekSlice(keys ...string) ([]interface{}, error)
- func (obj *JSONValue) PeekString(keys ...string) (string, error)
- func (obj *JSONValue) PeekStringDefault(def string, keys ...string) string
- func (obj *JSONValue) PeekTimeFromString(layout string, keys ...string) (time.Time, error)
- func (obj *JSONValue) PeekTimeFromUnix(keys ...string) (time.Time, error)
- func (obj *JSONValue) String() string
Constants ¶
View Source
const (
SliceRand = "sha.jsonx.rand"
)
Variables ¶
View Source
var ErrUnexpectedJSON = errors.New("sha.jsonx: unexpected json structure")
Functions ¶
Types ¶
type JSONValue ¶
type JSONValue struct {
// contains filtered or unexported fields
}
func (*JSONValue) PeekBoolDefault ¶
func (*JSONValue) PeekDefault ¶
func (*JSONValue) PeekFloatDefault ¶
func (*JSONValue) PeekIntDefault ¶
func (*JSONValue) PeekStringDefault ¶
func (*JSONValue) PeekTimeFromString ¶
func (*JSONValue) PeekTimeFromUnix ¶
Click to show internal directories.
Click to hide internal directories.