Skip to content

Commit fc91c0b

Browse files
committed
[FileFormats.MOF] Use JSON3 to write files
1 parent 7a081f4 commit fc91c0b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
99
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
1010
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
1111
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
12+
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
1213
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1314
MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0"
1415
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"

src/FileFormats/MOF/write.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44
# Use of this source code is governed by an MIT-style license that can be found
55
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.
6+
using JSON3
67

78
"""
89
Base.write(io::IO, model::FileFormats.MOF.Model)
@@ -29,8 +30,7 @@ function Base.write(io::IO, model::Model)
2930
objective = objective,
3031
constraints = constraints,
3132
)
32-
indent = options.print_compact ? nothing : 2
33-
Base.write(io, JSON.json(object, indent))
33+
Base.write(io, JSON3.write(object))
3434
return
3535
end
3636

0 commit comments

Comments
 (0)