Skip to content
New issue

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

empty array can't be exported to JSON #2

Open
cserteGT3 opened this issue Apr 2, 2020 · 1 comment
Open

empty array can't be exported to JSON #2

cserteGT3 opened this issue Apr 2, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@cserteGT3
Copy link
Owner

julia> using RANSAC

julia> exportJSON(stdout, [])
ERROR: MethodError: no method matching toDict(::Array{Any,1})
Closest candidates are:
  toDict(::FittedShape) at C:\Users\Laci\.julia\dev\RANSAC\src\json.jl:10
  toDict(::ShapeCandidate) at C:\Users\Laci\.julia\dev\RANSAC\src\json.jl:18
  toDict(::ScoredShape) at C:\Users\Laci\.julia\dev\RANSAC\src\json.jl:20
  ...
Stacktrace:
 [1] exportJSON(::Base.TTY, ::Array{Any,1}) at C:\Users\Laci\.julia\dev\RANSAC\src\json.jl:58
 [2] top-level scope at REPL[2]:1
@cserteGT3 cserteGT3 changed the title empty array can't b exported to JSON empty array can't be exported to JSON Apr 2, 2020
@cserteGT3 cserteGT3 added the bug Something isn't working label Apr 2, 2020
@cserteGT3
Copy link
Owner Author

An empty array of FittedShape ,etc works:

julia> using RANSAC

julia> exportJSON(stdout, ScoredShape[])
{"primitives":[]}
julia> exportJSON(stdout, FittedShape[])
{"primitives":[]}
julia> exportJSON(stdout, ShapeCandidate[])
{"primitives":[]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant