diff --git a/scripts/diff.jl b/scripts/diff.jl index 225ecc4f..baa3ce16 100644 --- a/scripts/diff.jl +++ b/scripts/diff.jl @@ -1,4 +1,5 @@ import YAML +import OrderedCollections if length(ARGS) != 3 println("Usage: madsjl.jl diff file1.mads file2.mads") @@ -60,7 +61,7 @@ function printdiff(prefix, thing1, thing2, depth) end end -f1 = YAML.load_file(ARGS[2]) -f2 = YAML.load_file(ARGS[3]) +f1 = YAML.load_file(ARGS[2]; dicttype=OrderedCollections.OrderedDict{String,Any}) +f2 = YAML.load_file(ARGS[3]; dicttype=OrderedCollections.OrderedDict{String,Any}) printdiff("", f1, f2, 6) diff --git a/src/MadsIO.jl b/src/MadsIO.jl index 2ff0899a..780796fd 100644 --- a/src/MadsIO.jl +++ b/src/MadsIO.jl @@ -393,7 +393,7 @@ function loadbigyamlfile(filename::AbstractString) end if yamlflag io = IOBuffer(join(lines[parseindeces], '\n')) - madsdata = YAML.load(io) + madsdata = YAML.load(io; dicttype=OrderedCollections.OrderedDict{String,Any}) else madsdata = OrderedCollections.OrderedDict{String,Any}() end diff --git a/src/MadsYAML.jl b/src/MadsYAML.jl index b2b8f57c..e7f7c91e 100644 --- a/src/MadsYAML.jl +++ b/src/MadsYAML.jl @@ -14,7 +14,7 @@ Returns: - data in the yaml input file """ function loadyamlfile(filename::AbstractString) - yamldata = YAML.load_file(filename) + yamldata = YAML.load_file(filename; dicttype=OrderedCollections.OrderedDict{String,Any}) return yamldata end