Skip to content

Commit

Permalink
Update use of JSON.colon to JSON.separator
Browse files Browse the repository at this point in the history
According to JuliaIO/JSON.jl@bd1eb8a
Possibly fixes JuliaPlots#46
  • Loading branch information
cdsousa authored Jun 15, 2016
1 parent 6eb69f1 commit 3878b1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/json.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ function JSON._print(io::IO, state::JSON.State, a::Union{Shape,GenericTrace})
JSON.start_object(io, state, true)
range = keys(a.fields)
if length(range) > 0
Base.print(io, JSON.prefix(state), "\"", :type, "\"", JSON.colon(state))
Base.print(io, JSON.prefix(state), "\"", :type, "\"", JSON.separator(state))
JSON._print(io, state, a.kind)

for name in range
Base.print(io, ",")
JSON.printsp(io, state)
Base.print(io, "\"", name, "\"", JSON.colon(state))
Base.print(io, "\"", name, "\"", JSON.separator(state))
JSON._print(io, state, a.fields[name])
end
end
Expand All @@ -32,13 +32,13 @@ function JSON._print(io::IO, state::JSON.State, p::Plot)
JSON.start_object(io, state, true)

# print data
Base.print(io, JSON.prefix(state), "\"data\"", JSON.colon(state))
Base.print(io, JSON.prefix(state), "\"data\"", JSON.separator(state))
JSON._print(io, state, p.data)
Base.print(io, ",")

# print layout
JSON.printsp(io, state)
Base.print(io, JSON.prefix(state), "\"layout\"", JSON.colon(state))
Base.print(io, JSON.prefix(state), "\"layout\"", JSON.separator(state))
JSON._print(io, state, p.layout)
JSON.end_object(io, state, true)
end
Expand Down

0 comments on commit 3878b1f

Please sign in to comment.