nicolasff / webdis

A Redis HTTP interface with JSON output
https://webd.is
BSD 2-Clause "Simplified" License
2.82k stars 307 forks source link

Add support for REDIS_REPLY_STATUS in nested JSON #189

Closed jessie-murray closed 3 years ago

jessie-murray commented 3 years ago

When strings are added as elements of an array but typed as REDIS_REPLY_STATUS instead of REDIS_REPLY_STRING, Webdis encodes them as nulls. REDIS_REPLY_STATUS should only be encoded as [true, str] or [false, str] when this is a top-level status response, not an array element. In these cases we only need the string.

Fixes #188

nicolasff commented 3 years ago

Nice and short. Thanks!