Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi,It will fail when the key is a string convert from int,How to solve it? #62

Open
lxyhust2018 opened this issue Aug 9, 2022 · 1 comment

Comments

@lxyhust2018
Copy link

the code is like this,it will hold till time out.
val := "val"
key := "123"
res,_ := sjson.Set(res,key,val)

@Faridalim
Copy link

Hi, it seems that my code running well when i tried this :

number, _ := sjson.Set(`{"number": 23}`, "23", "number")
println(number)
//result : {"number": 23,"23":"number"}

you need to change res input to another string. Your res input is not yet declared

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants