use Set to set a string value then the "" is miss
i did this
configBytes, err := j.Set(configByte, []byte("http://github.com"), "test")
then the json is
"test":http://github.com,
i try a int like configBytes, err := j.Set(configByte, []byte("2"), "test")
then it works "test":2, because it's' ok
finally i try this
configBytes, err := j.Set(configByte, []byte("\"http://github.com\""), "test")
then it works~
but i feel it's not cool and not frendly to noob,right?
Any news on that?
+1
+1
Set will exactly set what your []byte contains. If you don't like to handle the escape with the slash, you may try a backtick string
configBytes, err := j.Set(configByte, []byte(`"http://github.com"`), "test")
output: "test":"http://github.com"