Incorrect handling of escaping of "
using JSON3
#=
Put this content in the file test.json
{ "objects": [ { "a": 1, "b": "here is a sting" }, { "b": "here is a string with a quote "", "a": 1 } ] }
=#
#json_string = """{"objects":[{"a":1,"b":"here is a sting"},{"b":"here is a string with a quote "","a":1}]}""" json_string = read("test.json", String)
!isfile("types.jl") && JSON3.writetypes(json_string, "types.jl"; module_name=:MyModule, root_name=:Root, mutable=false)
!isdefined(Main, :MyModule) && include("types.jl")
rootObject =JSON3.read(json_string, MyModule.Root)
Note that the quote in the line: here is a string with a quote " should be escaped with a backslash, but that is not included in the text. This escaping problem may cause multiple different errors.