tidwall / sjson

Set JSON values very quickly in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Delete() removing keys that should not be deleted

richardardrichard opened this issue · comments

When running the following code, both the aaaaaaaaa and nnnnn characters are deleted:

fmt.Println(sjson.Delete("{\"_T\": \"sssssssssssssss\", \"ccccccccc\": {\"name\": \"ttttttttttt\", \"aaaaaaaaa\": \"ttttttt.ttttt\", \"nnnnn\": \"4000\"}}", "ccccccccc.nnnnn"))

> {"_T": "sssssssssssssss", "ccccccccc": {"name": "ttttttttttt"}}

Hi Richard,

I'm wondering why you closed your issue because we are seeing similar behaviour and submitted an issue with a demonstration unit test, please see: #21

Perhaps you have a work around?

Thanks in advance