You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JSON.RESP and RESP3 doubles are formatted differently from Redis #472
JSON.RESP:as_resp in src/commands/json.rs (around lines 455-458) sends a non-integer number as a bulk string of its JSON text in both RESP2 and RESP3, for example 1.0, -0.0, 100000.0. RedisJSON sends Redis's double reply instead. In RESP2 that is Redis's double text (1, -0, 100000, 1.234567891234568e+8). In RESP3 it should be a native , double; this needs confirming against Redis.
Every RESP3 double: all of them go through format_redis_double (src/resp/write.rs, around lines 121-133), which uses Rust's {} and never writes an exponent. This affects resp_double_resp3 and the JSON.NUMINCRBY/NUMMULTBY RESP3 replies. So 1e300 goes out as a 301-digit integer string, and 1.8446744073709552e19 as 18446744073709552000, where Redis writes 1e+300. It also writes -0 as 0.
Clients parse both forms, but the replies don't match Redis byte for byte, and the exponent-free form can be very long.
Found while reviewing #463 (#445). RedisJSON's replies come from a byte-for-byte probe against Redis 8.10.3.
Activity