Skip to content

Commit

Permalink
remove el_type
Browse files Browse the repository at this point in the history
  • Loading branch information
WestleyArgentum committed Apr 10, 2013
1 parent 15ecd9a commit 4ce9576
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/JSON.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '}'
Expand All @@ -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
Expand All @@ -311,6 +311,4 @@ function parse(io::IO, el_type)
parse(obj)
end

parse(io::IO) = parse(io, Char)

end

0 comments on commit 4ce9576

Please sign in to comment.