cheshire icon indicating copy to clipboard operation
cheshire copied to clipboard

byte-array encoding/decoding is not symetrical

Open smessems opened this issue 6 years ago • 1 comments

Hi, when encoding a byte-array, the internal call to writeBinary encodes it as base64. However, the parse-string returns it as the encoded base64 string. Maybe, this only needs to be documented, I am not sure.

The relevant test, uses threading-last instead of threading-first macro, hence the issue is not detected ( inside test-round-trip-binary ):

(= (->> bin-obj (get "byte-array") seq) (->> roundtripped (get "byte-array") seq)

smessems avatar Jun 05 '19 07:06 smessems

I don't think this is solvable without the user having to give information to the parser about where the byte arrays are.

gfredericks avatar Jun 05 '19 10:06 gfredericks