Skip to content

Commit

Permalink
remove JSON -> JSON3
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed Sep 21, 2024
1 parent cc436e1 commit 6957939
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ DocStringExtensions = "~v0.9"
HDF5 = "~0.17"
InfrastructureSystems = "2"
InteractiveUtils = "1"
JSON = "0.21"
JSON3 = "1"
JuMP = "1"
LinearAlgebra = "1"
Expand Down
1 change: 0 additions & 1 deletion src/PowerSimulations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ import TimeSeries

# I/O Imports
import DataFrames
import JSON
import CSV
import HDF5
import PrettyTables
Expand Down
4 changes: 2 additions & 2 deletions src/utils/file_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Return a decoded JSON file.
"""
function read_json(filename::AbstractString)
open(filename, "r") do io
JSON.parse(io)
JSON3.parse(io)
end
end

Expand All @@ -28,7 +28,7 @@ end

function read_file_hashes(path)
data = open(joinpath(path, IS.HASH_FILENAME), "r") do io
JSON.parse(io)
JSON3.parse(io)
end

return data["files"]
Expand Down
2 changes: 1 addition & 1 deletion src/utils/jump_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function add_jump_parameter(jump_model::JuMP.Model, val::Number)
end

function write_data(base_power::Float64, save_path::String)
JSON.write(joinpath(save_path, "base_power.json"), JSON.json(base_power))
JSON3.write(joinpath(save_path, "base_power.json"), JSON3.json(base_power))
return
end

Expand Down

0 comments on commit 6957939

Please sign in to comment.