jsonaf icon indicating copy to clipboard operation
jsonaf copied to clipboard

Fixed code point decoding

Open sagotch opened this issue 6 years ago • 0 comments

Hi.

I debugged and "fixed" (by copying/pasting code from Yojson) the unicode code point decoding.

Prior to this PR, this is the behavior of jsonaf:

match Jsonaf.of_string {| { "foo": "\u00E9" } |} with
| Ok (`Object ["foo", `String s]) -> s
| _ -> assert false ;;
- : string = "àƒ©"
match Jsonaf.of_string {| { "foo": "\u00E9" } |} with
| Ok (`Object ["foo", `String s]) -> s
| _ -> assert false ;;
- : string = "é"

\u00E9 is é (cf: http://www.fileformat.info/info/unicode/char/e9/index.htm)


Also, I upgrade the build to use recent versions of dune. I am not sure about what is done in opam file, but dune upgrade is responsible for this.

sagotch avatar Nov 06 '19 14:11 sagotch