Documentation ¶
Index ¶
- type JSONObject
- func (o JSONObject) Delete(key string)
- func (o JSONObject) Get(key string) any
- func (o JSONObject) Parameterize(key string) *value.ValueParameter
- func (o JSONObject) ParameterizeAttributeWith(keyOfJSONAttribute string, nameOfParameter string) *value.ValueParameter
- func (o JSONObject) ToJSON() ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONObject ¶
func NewJSONObject ¶
func NewJSONObject(raw []byte) (JSONObject, error)
NewJSONObject is a function that creates a JSONObject from a raw JSON byte slice.
func (JSONObject) Delete ¶
func (o JSONObject) Delete(key string)
Delete removes a key-value pair for the specified key from JSONObject.
func (JSONObject) Get ¶
func (o JSONObject) Get(key string) any
Get returns the value associated with a specified key in the JSONObject. If requested key doesn't exist, nil is returned.
func (JSONObject) Parameterize ¶
func (o JSONObject) Parameterize(key string) *value.ValueParameter
Parameterize replaces the value associated with a specified key in the JSONObject with a template placeholder.
func (JSONObject) ParameterizeAttributeWith ¶
func (o JSONObject) ParameterizeAttributeWith(keyOfJSONAttribute string, nameOfParameter string) *value.ValueParameter
ParameterizeAttributeWith replace value of the given key with the given parameter name. The returned ValueParameter contains just replaced value for the given key.
func (JSONObject) ToJSON ¶
func (o JSONObject) ToJSON() ([]byte, error)
ToJSON converts JSONObject to its []byte representation.
Click to show internal directories.
Click to hide internal directories.