Closed arigon closed 2 years ago
Hi,
The @
symbol is one of the reserved character. The workaround is to escape it with a \
character.
// Using either one of these styles
sjson.SetBytes([]byte(`{"Test":123}`), "\\@timestamp", time.Now().Unix())
sjson.SetBytes([]byte(`{"Test":123}`), `\@timestamp`, time.Now().Unix())
Thank you!
Hello
version 1.2.0+ which added "updates of complex paths" breaks updating keys beginning with the @ symbol.
Example:
Current Result:
{"Test":123}
Expected:
{"Test":123,"@timestamp":1639152890}
Is there a workaround?