ezjsonm icon indicating copy to clipboard operation
ezjsonm copied to clipboard

to_sexp: never fail representing json as sexp

Open vbmithr opened this issue 5 years ago • 3 comments

vbmithr avatar Apr 05 '20 09:04 vbmithr

This doesn't do the same thing as the previous to_sexp function (which went through decode_string to match encode_string and use the Hex representation of the string). Could you give more details about what you're trying to fix here @vbmithr ?

avsm avatar Jul 28 '20 17:07 avsm

The goal was to have a to_sexp function that would never fail (I didn't care about the exact sexp shape as long as it made sense and was useful as a debugging/printing purpose).

vbmithr avatar Jul 28 '20 18:07 vbmithr

Could you explain why to_sexp was written like this in the first place? Like why it would stringify a piece of json and raise an exception in some cases? I've never seen to_sexp functions to raise an exception half of the times in other libraries, i.e. Jane Street ones.

vbmithr avatar Aug 01 '20 18:08 vbmithr