How should I update the key if there are dots and slashes in the key?
echo567 opened this issue · comments
You can use \\
to escape them. eg:
value, err = sjson.Set(value, "address.a\\.b\\.c\\/d", "some value")
Haven't tested escaping a /
before though so you might have to tweak it.
If you're using gjson, you can also do:
value, err = sjson.Set(value, gjson.Escape("address.a.b.c/d"), "some value")