I have read a JSON using JSON3.jl but after that I can’t seem to modify the json.
E.g.
a = JSON3.read("{\"a\":1}")
a[:b] = 2
what I get is this.
Is there an easy to mutate the object?
LoadError: MethodError: no method matching setindex!(::JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}}, ::Int64, ::Symbol)
e[0mClosest candidates are:
e[0m setindex!(::AbstractDict, ::Any, ::Any, e[91m::Anye[39m, e[91m::Any...e[39m) at abstractdict.jl:505
MethodError: no method matching setindex!(::JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}}, ::Int64, ::Symbol)
Closest candidates are:
setindex!(::AbstractDict, ::Any, ::Any, ::Any, ::Any...) at abstractdict.jl:505
Stacktrace:
[1] top-level scope
@ In[139]:3
[2] eval
@ ./boot.jl:360 [inlined]
[3] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1094