Documentation ¶
Overview ¶
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-10-24 11:25:16 * @FilePath: \go-toolbox\pkg\json\base.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Marshal is exported by go-toolbox/json package. Marshal = json.Marshal // Unmarshal is exported by go-toolbox/json package. Unmarshal = json.Unmarshal // MarshalIndent is exported by go-toolbox/json package. MarshalIndent = json.MarshalIndent // NewDecoder is exported by go-toolbox/json package. NewDecoder = json.NewDecoder // NewEncoder is exported by go-toolbox/json package. NewEncoder = json.NewEncoder )
Functions ¶
func AppendKeysToJSON ¶
func AppendKeysToJSON(originalJSON string, pairs *KeyValuePairs) (string, error)
AppendKeysToJSON 将键值对追加到 JSON 字符串中
Types ¶
type KeyValuePairs ¶
type KeyValuePairs struct {
// contains filtered or unexported fields
}
KeyValuePairs 是一个用于存储键值对的结构体
func NewKeyValuePairs ¶
func NewKeyValuePairs() *KeyValuePairs
NewKeyValuePairs 创建一个新的 KeyValuePairs 实例
func (*KeyValuePairs) Add ¶
func (kv *KeyValuePairs) Add(key string, value interface{}) *KeyValuePairs
Add 向 KeyValuePairs 中添加一个键值对
Click to show internal directories.
Click to hide internal directories.