From cfb63ae3a81c23629a5583eb2173c1270a620987 Mon Sep 17 00:00:00 2001 From: Jose Daniel Lara Date: Tue, 24 Sep 2024 13:24:17 -0600 Subject: [PATCH] remove JSON -> JSON3 --- Project.toml | 1 - src/PowerSimulations.jl | 1 - src/utils/file_utils.jl | 4 ++-- src/utils/jump_utils.jl | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index 53a901c19e..e2c8fafa10 100644 --- a/Project.toml +++ b/Project.toml @@ -38,7 +38,6 @@ DocStringExtensions = "~v0.9" HDF5 = "~0.17" InfrastructureSystems = "2" InteractiveUtils = "1" -JSON = "0.21" JSON3 = "1" JuMP = "1" LinearAlgebra = "1" diff --git a/src/PowerSimulations.jl b/src/PowerSimulations.jl index f4d882d98d..ddca095e63 100644 --- a/src/PowerSimulations.jl +++ b/src/PowerSimulations.jl @@ -412,7 +412,6 @@ import TimeSeries # I/O Imports import DataFrames -import JSON import CSV import HDF5 import PrettyTables diff --git a/src/utils/file_utils.jl b/src/utils/file_utils.jl index 9ea6116bba..8ee977d894 100644 --- a/src/utils/file_utils.jl +++ b/src/utils/file_utils.jl @@ -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 @@ -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"] diff --git a/src/utils/jump_utils.jl b/src/utils/jump_utils.jl index e610a91ae5..e8635e607e 100644 --- a/src/utils/jump_utils.jl +++ b/src/utils/jump_utils.jl @@ -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