jsons

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 6 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 string) *Json

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

func (*Json) Array

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

Array Data type conversion.

func (*Json) Float32

func (j *Json) Float32() float32

Float32 Data type conversion.

func (*Json) Float64

func (j *Json) Float64() float64

Float64 Data type conversion.

func (*Json) Get

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

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

func (*Json) Int

func (j *Json) Int() int

Int Data type conversion.

func (*Json) Int32

func (j *Json) Int32() int32

Int32 Data type conversion.

func (*Json) Int64

func (j *Json) Int64() int64

Int64 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) MapString

func (j *Json) MapString() map[string]string

MapString Data type conversion.

func (*Json) Read

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

Read Parse json according to point split

func (*Json) String

func (j *Json) String() string

String Data type conversion.

func (*Json) Strings

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

Strings Data type conversion.

Jump to

Keyboard shortcuts

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