diff --git a/src/JSON.jl b/src/JSON.jl index 980a774..46f0c1e 100644 --- a/src/JSON.jl +++ b/src/JSON.jl @@ -278,14 +278,14 @@ function parse(strng::String) end -function parse(io::IO, el_type) +function parse(io::IO) obj = "" open_bracket = nothing close_bracket = nothing num_brackets_needed = 1 while open_bracket == nothing - c = char(read(io, el_type)) + c = read(io, Char) if c == '{' open_bracket = '{' close_bracket = '}' @@ -298,7 +298,7 @@ function parse(io::IO, el_type) obj = string(open_bracket) while num_brackets_needed > 0 - c = char(read(io, el_type)) + c = char(read(io, Char)) obj = string(obj, c) if c == open_bracket @@ -311,6 +311,4 @@ function parse(io::IO, el_type) parse(obj) end -parse(io::IO) = parse(io, Char) - end