增加基于sjson实现的IJsonWrite

This commit is contained in:
2025-05-06 12:07:58 +08:00
parent 8489acbef8
commit 1124ff6a33
2 changed files with 79 additions and 1 deletions

View File

@ -10,11 +10,15 @@ package abstract
// IJsonWrite json数据写入
type IJsonWrite interface {
// Set 设置一个路径的值
Set(dataPath string, data interface{}) error
Set(dataPath string, data any) error
// Result 最终结果以字符串形式返回
Result() string
// Map 最终结果以map返回
Map() (map[string]any, error)
// MapWithReceiver 外部指针接收返回值
MapWithReceiver(receiver any) error
// Array 最终结果以数组返回
Array() ([]any, error)
// ArrayWithReceiver 外部指针接收返回值
ArrayWithReceiver(receiver any) error
}