Documentation ¶
Index ¶
- type A
- type O
- func (jObj O) Get(key string) interface{}
- func (jObj O) GetArray(key string) (newArray *A, err error)
- func (jObj O) GetBoolean(key string) (bool, error)
- func (jObj O) GetFloat64(key string) (float64, error)
- func (jObj O) GetInt(key string) (int, error)
- func (jObj O) GetInt64(key string) (int64, error)
- func (jObj O) GetObject(key string) (value O, err error)
- func (jObj O) GetString(key string) (string, error)
- func (jObj O) Has(key string) bool
- func (jObj O) Indent() string
- func (jObj O) Keys() (objKeys []string)
- func (jObj O) Put(key string, value interface{}) O
- func (jObj O) Remove(key string) O
- func (jObj O) String() string
- type Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type A ¶
type A []interface{}
A A represents Json Array.
func ParseJsonArray ¶
ParseJsonArray parse an array to generate the json map structure
type O ¶
type O map[string]interface{}
O represents a Json Object.
func ParseJsonObject ¶
ParseJsonObject parse the json object to generate the json map structure
func (O) Get ¶
Get retrieves an element from a json object. Type of the return value is not predefined, caller has to check the return type.
func (O) GetArray ¶
GetArray retrieves a json array data from a json object. Return error, if key not exist or data type not json array.
func (O) GetBoolean ¶
GetBoolean retrieves a boolean data from a json object. Return error, if key not exist or data type not boolean.
func (O) GetFloat64 ¶
GetFloat64 retrieves a float64 data from a json object. Return error, if key not exist or data type not float64.
func (O) GetInt ¶
GetInt retrieves an int data from a json object. Return error, if key not exist or data type not int.
func (O) GetInt64 ¶
GetInt64 retrieves an int64 data from a json object. Return error, if key not exist or data type not int64.
func (O) GetObject ¶
GetObject retrieves a json object data from a json object. Return error, if key not exist or data type not json object.
func (O) GetString ¶
GetString retrieves a string data from a json object. Return error, if key not exist or data type not string.
func (O) Has ¶
Has checks the object has an element in the name of the input string. Returns true if present, else false.
func (O) Indent ¶
Indent on object generates a string representation of json object with proper indent.