We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{ "contents": "While \u003Ca href=\"https://www.pcgamer.com/uk/search/?searchTerm=team+fortress+2\" " }
using JSON json = """ { "contents": "While \u003Ca href=\"https://www.pcgamer.com/uk/search/?searchTerm=team+fortress+2\" " } """ JSON.parse(json)
Then throw a error:
ERROR: Expected ',' here Line: 1 Around: ...<a href="https://www.pcgamer.c... ^ Stacktrace: [1] _error(message::String, ps::JSON.Parser.MemoryParserState) @ JSON.Parser ~/.julia/packages/JSON/93Ea8/src/Parser.jl:140 [2] _error_expected_char(c::UInt8, ps::JSON.Parser.MemoryParserState) @ JSON.Parser ~/.julia/packages/JSON/93Ea8/src/Parser.jl:83 [3] skip! @ ~/.julia/packages/JSON/93Ea8/src/Parser.jl:80 [inlined] [4] parse_object(pc::JSON.Parser.ParserContext{Dict{String, Any}, Int64, true, nothing}, ps::JSON.Parser.MemoryParserState) @ JSON.Parser ~/.julia/packages/JSON/93Ea8/src/Parser.jl:234 [5] parse_value(pc::JSON.Parser.ParserContext{Dict{String, Any}, Int64, true, nothing}, ps::JSON.Parser.MemoryParserState) @ JSON.Parser ~/.julia/packages/JSON/93Ea8/src/Parser.jl:166 [6] parse(str::String; dicttype::Type, inttype::Type{Int64}, allownan::Bool, null::Nothing) @ JSON.Parser ~/.julia/packages/JSON/93Ea8/src/Parser.jl:450 [7] parse(str::String) @ JSON.Parser ~/.julia/packages/JSON/93Ea8/src/Parser.jl:443 [8] top-level scope @ REPL[4]:1
Why? I think this is a validated json string.
The text was updated successfully, but these errors were encountered:
This is just julia string parsing. The \" in your string literal resulted in just a ".
\"
"
julia> using JSON julia> json = """ { "contents": "While \u003Ca href=\"https://www.pcgamer.com/uk/search/?searchTerm=team+fortress+2\" " } """; julia> json2 = """ { "contents": "While \u003Ca href=\\"https://www.pcgamer.com/uk/search/?searchTerm=team+fortress+2\\" " } """; julia> println(json) { "contents": "While <a href="https://www.pcgamer.com/uk/search/?searchTerm=team+fortress+2" " } julia> println(json2) { "contents": "While <a href=\"https://www.pcgamer.com/uk/search/?searchTerm=team+fortress+2\" " } julia> JSON.parse(json) ERROR: Expected ',' here Line: 1 Around: ...<a href="https://www.pcgamer.c... ^ Stacktrace: <......> julia> JSON.parse(json2) Dict{String, Any} with 1 entry: "contents" => "While <a href=\"https://www.pcgamer.com/uk/search/?searchTerm=tea…
Sorry, something went wrong.
No branches or pull requests
Then throw a error:
Why? I think this is a validated json string.
The text was updated successfully, but these errors were encountered: