JuliaData / JSONTables.jl

JSON3.jl + Tables.jl
MIT License
68 stars 10 forks source link

Escape sequences #3

Closed bkamins closed 5 years ago

bkamins commented 5 years ago

\/ escape is not handled correctly I think. E.g.

julia> JSON.parse("{\"a\":\"b\\/c\"}")
Dict{String,Any} with 1 entry:
  "a" => "b/c"

but

julia> JSONTables.jsontable("{\"a\":\"b\\/c\"}")
JSONTables.Table{true,JSON3.Object{Base.CodeUnits{UInt8,String},Array{UInt64,1}}}(Error showing value of type JSONTables.Table{true,JSON3.Object{Base.CodeUnits{UInt8,String},Array{UInt64,1}}}:
ERROR: ArgumentError: encountered invalid escape character in json string: "b\/c"

(it would be great to get it fixed and tagged, in mid August I am running a workshop in which I will use JSON files containing such escapes).

Thank you!

bkamins commented 5 years ago

Closing this as it probably should live in JSON3.jl, https://github.com/quinnj/JSON3.jl/issues/19