quinnj / JSON3.jl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Correct handling of escape \/

bkamins opened this issue · comments

\/ 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> JSON3.read("{\"a\":\"b\\/c\"}")
JSON3.Object{Base.CodeUnits{UInt8,String},Array{UInt64,1}} with 1 entryError showing value of type 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!

Fixed; thanks for reporting.