-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
wondering why the following doesn't work. Any advice would be greatly appreciated.
julia> testj =
"""{
"x": 1,
"y": "a"
}""";
julia> testl = LazyJSON.value(testj);
julia> convert(NamedTuple{(:x, :y), Tuple{Int, String}}, testl)
ERROR: MethodError: no method matching NamedTuple{(:x, :y),Tuple{Int64,String}}(::LazyJSON.Number{String}, ::LazyJSON.String{String})
Closest candidates are:
NamedTuple{(:x, :y),Tuple{Int64,String}}(::Any) where {names, T<:Tuple} at namedtuple.jl:92
Stacktrace:
[1] macro expansion at /home/yx/.julia/packages/LazyJSON/EmafJ/src/AbstractDict.jl:82 [inlined]
[2] convert(::Type{NamedTuple{(:x, :y),Tuple{Int64,String}}}, ::LazyJSON.Object{Nothing,String}) at /home/yx/.julia/packages/LazyJSON/EmafJ/src/AbstractDict.jl:82
[3] top-level scope at none:0
Metadata
Metadata
Assignees
Labels
No labels