diff --git a/src/JSON3.jl b/src/JSON3.jl index 4b5d297..3150500 100644 --- a/src/JSON3.jl +++ b/src/JSON3.jl @@ -26,7 +26,7 @@ invalid JSON at byte position $pos while parsing type $T: $error $(String(buf[max(1, pos-25):min(end, pos+25)])) """)) -@enum Error UnexpectedEOF ExpectedOpeningObjectChar ExpectedOpeningQuoteChar ExpectedOpeningArrayChar ExpectedClosingArrayChar ExpectedComma ExpectedSemiColon InvalidChar +@enum Error UnexpectedEOF ExpectedOpeningObjectChar ExpectedOpeningQuoteChar ExpectedOpeningArrayChar ExpectedClosingArrayChar ExpectedComma ExpectedSemiColon InvalidChar InvalidNumber # AbstractDict interface function Base.length(obj::Object) diff --git a/src/read.jl b/src/read.jl index d9d8f24..3141fd8 100644 --- a/src/read.jl +++ b/src/read.jl @@ -66,6 +66,7 @@ function read!(buf, pos, len, b, tape, tapeidx, ::Type{Any}, checkint=true) end return floatpos, tapeidx + 2 end + invalid(InvalidNumber, buf, pos, Float64) end @label invalid invalid(InvalidChar, buf, pos, Any)