Data mismatch while exporting to JSON
I used RIOT to migrate data from Elasticache to Memorystore. I ran my validation rules and everything succeeded. I then exported the data in Memorystore using file-export to a JSON file, flushed the DB and imported the JSON using dump-import.
Now when I run the validation program, the hashes do not pass validation since some of the binary objects seem to have changed.
I'm quite new to this so not sure if this is a bug or a platform dependent issue.
I am also seeing mismatches when trying to roundtrip binary data through JSON (and also CSV and XML).
The following script reproduces the issue for me:
key="foobar"
value="$(printf '\x80\x04\x95')"
redis-cli -n 8 SET "$key" "$value"
riot file-export -n 8 ./test.json
riot file-import -n 9 ./test.json
# --quoted-json produces a string we can echo to the terminal
original="$(redis-cli --quoted-json -n 8 GET "$key")"
imported="$(redis-cli --quoted-json -n 9 GET "$key")"
echo "imported value of key $key: $(redis-cli -n 9 get "$key")"
if ! [ "$original" = "$imported" ]; then
echo "FAILURE:"
echo " original: $original"
echo " imported: $imported"
fi
Same here, apparently RIOT does not support binary values, only strings. I've wasted my time on this :|