jsonaf
jsonaf copied to clipboard
Fixed code point decoding
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.