ajson

package
v1.6.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(data interface{}) string

Encode Parses map to JSON string<解析map转json字符串>

func Open

func Open(file string) []byte

Open 读取json文件

Types

type Json

type Json struct {
	Child interface{} //json next level.
}

Json Json parameter structure.

func Decode

func Decode(data []byte) *Json

Decode Parse array.<解析json字符串>

func (*Json) Array

func (j *Json) Array() []interface{}

Array Data type conversion.

func (*Json) Bool

func (j *Json) Bool() bool

Bool Data type conversion.

func (*Json) Byte

func (j *Json) Byte() byte

Byte Data type conversion.

func (*Json) Bytes

func (j *Json) Bytes() []byte

Bytes Data type conversion.

func (*Json) End

func (j *Json) End()

End Data type conversion.

func (*Json) Float64

func (j *Json) Float64() float64

Float64 Data type conversion.

func (*Json) Get

func (j *Json) Get(name string) *Json

Get Parse json according to point split

func (*Json) Int

func (j *Json) Int() int

Int Data type conversion.

func (*Json) Int64

func (j *Json) Int64() int64

Int64 Data type conversion.

func (*Json) Interface

func (j *Json) Interface() interface{}

Interface Data type conversion.

func (*Json) Interfaces

func (j *Json) Interfaces() []interface{}

Interfaces Data type conversion.

func (*Json) Ints

func (j *Json) Ints() []int

Ints Data type conversion.

func (*Json) Map

func (j *Json) Map() map[string]interface{}

Map Data type conversion.

func (*Json) Maps

func (j *Json) Maps() []map[string]interface{}

Maps Data type conversion.

func (*Json) Next

func (j *Json) Next(name interface{}) *Json

Next the next level of array or json.<获取json的节点>

func (*Json) String

func (j *Json) String() string

String Data type conversion.

func (*Json) Strings

func (j *Json) Strings() []string

Strings Data type conversion.

func (*Json) Uint

func (j *Json) Uint() uint

Uint Data type conversion.

func (*Json) Uint16

func (j *Json) Uint16() uint16

Uint16 Data type conversion.

func (*Json) Uint32

func (j *Json) Uint32() uint32

Uint32 Data type conversion.

func (*Json) Uint64

func (j *Json) Uint64() uint64

Uint64 Data type conversion.

func (*Json) Uint8

func (j *Json) Uint8() uint8

Uint8 Data type conversion.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL