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

Catch if infinity returned by parse_jsconstant is nothing #371

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

IanButterworth
Copy link
Member

Fixes

  │││││││││┌ parse(str::String) @ JSON.Parser /Users/ian/Documents/GitHub/JSON.jl/src/Parser.jl:443
  ││││││││││┌ parse(str::String; dicttype::Type{Dict{String, Any}}, inttype::Type{Int64}, allownan::Bool, null::Nothing) @ JSON.Parser /Users/ian/Documents/GitHub/JSON.jl/src/Parser.jl:450
  │││││││││││┌ parse_value(pc::JSON.Parser.ParserContext{Dict{String, Any}, Int64, true, nothing}, ps::JSON.Parser.MemoryParserState) @ JSON.Parser /Users/ian/Documents/GitHub/JSON.jl/src/Parser.jl:164
  ││││││││││││┌ parse_number(pc::JSON.Parser.ParserContext{Dict{String, Any}, Int64, true, nothing}, ps::JSON.Parser.MemoryParserState) @ JSON.Parser /Users/ian/Documents/GitHub/JSON.jl/src/specialized.jl:148
  │││││││││││││ no matching method found `-(::Nothing)` (1/3 union split): JSON.Parser.:-(infinity::Union{Nothing, Bool, Float64})
  ││││││││││││└────────────────────
  ││││││││││││┌ parse_number(pc::JSON.Parser.ParserContext{Dict{String, Any}, Int64, true, nothing}, ps::JSON.Parser.MemoryParserState) @ JSON.Parser /Users/ian/Documents/GitHub/JSON.jl/src/specialized.jl:148
  │││││││││││││ no matching method found `-(::Nothing)` (1/3 union split): JSON.Parser.:-(infinity::Union{Nothing, Bool, Float64})::Union{Float64, Int64}
  ││││││││││││└────────────────────

@IanButterworth IanButterworth changed the title Avoid false nothing in parse_jsconstant return union Catch if infinity returned by parse_jsconstant is nothing Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant