diff --git a/README.md b/README.md index ae118e9..aeb940e 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Path syntax ----------- A path is a series of keys separated by a dot. -The dot and colon characters can be escaped with '\\'. +The dot and colon characters can be escaped with ``\``. ```json { diff --git a/sjson_test.go b/sjson_test.go index 0ac58de..e9f0df0 100644 --- a/sjson_test.go +++ b/sjson_test.go @@ -121,6 +121,10 @@ func TestBasic(t *testing.T) { `{":\1":{"this":[null,null,null,null,{".HI":4}]}}`, ``, "\\:\\\\1.this.4.\\.HI", `4`) + testRaw(t, setRaw, + `{"app.token":"cde"}`, + `{"app.token":"abc"}`, + "app\\.token", `"cde"`) testRaw(t, setRaw, `{"b":{"this":{"😇":""}}}`, ``,