sjson支持设置key中包含 . 字符

This commit is contained in:
2024-12-05 18:49:04 +08:00
parent f61f9b28b1
commit 96ff376470
2 changed files with 62 additions and 15 deletions

18
sjson_hack/set_test.go Normal file
View File

@ -0,0 +1,18 @@
// Package sjson_hack ...
//
// Description : sjson_hack ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2024-12-05 17:32
package sjson_hack
import (
"fmt"
"testing"
)
func TestSet(t *testing.T) {
res, err := Set("{}", "{{#a.b#}}.c.{{#c.d#}}.e", "test")
fmt.Println(res, err)
}