Originally Contributed by: Clayton Barrows
PowerSystems.jl supports serializing/deserializing data with JSON. This provides an example of how to write and read a System
to/from disk.
Let's use a dataset from the tabular data parsing tutorial:
using PowerSystems
file_dir = joinpath(pkgdir(PowerSystems), "docs", "src", "tutorials", "tutorials_data"); #hide
sys = System(joinpath(file_dir, "case5_re.m"))
folder = mktempdir();
path = joinpath(folder, "system.json")
println("Serializing to $path")
to_json(sys, path)
sys2 = System(path)