You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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)
The text was updated successfully, but these errors were encountered: