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
ERROR: ArgumentError: "a" is not a valid key for type Symbol
Stacktrace:
[1] setindex!(::Dict{Symbol,Int64}, ::LazyJSON.Number{String}, ::LazyJSON.String{String}) at ./dict.jl:374
[2] Dict{Symbol,Int64}(::LazyJSON.Object{Nothing,String}) at ./dict.jl:103
[3] top-level scope at none:0
I am no Julia expert. Should it remain like this or would it be possible to add Symbols as supported keys?
Anyway, my workaround is to define
import Base.setindex!
functionsetindex!(d::Dict{Symbol,T}, v::LT, k::LazyJSON.String{String}) where {T, LT}
setindex!(d,v,Symbol(k))
end
such that every LazyJSON.String is first converted to a Symbol.
The text was updated successfully, but these errors were encountered:
For dictionaries which use Symbols as keys, the convert function fails.
Here is a minimal example to reproduce the error message
Output:
I am no Julia expert. Should it remain like this or would it be possible to add Symbols as supported keys?
Anyway, my workaround is to define
such that every
LazyJSON.String
is first converted to aSymbol
.The text was updated successfully, but these errors were encountered: