redis / go-redis

Redis Go client
https://redis.uptrace.dev
BSD 2-Clause "Simplified" License
20.21k stars 2.38k forks source link

DOC-4228 JSON code examples #3114

Closed andy-stark-redis closed 2 months ago

andy-stark-redis commented 2 months ago

Go versions of the samples in the main JSON page and the JSON path page.

I made a redundant assignment of the inventory_json object in the ExampleClient_setbikes() function (line 464) to work around a glitch in the way the examples are displayed in the docs page. Also, I've included some long JSON output in the // Output: comments in some places. Please let me know if there are better ways to handle these situations.