JuliaIO / JSON.jl

JSON parsing and printing
Other
311 stars 100 forks source link

Add `JSON.printfile` function #325

Open stelmo opened 3 years ago

stelmo commented 3 years ago

Hi, is there a reason why JSON.printfile(filename::String, dictionary_object) does not exist? Like an analog of JSON.parsefile?

If not, would it be a simple matter of adding in a one liner in the package like JSON.printfile(fname, dict) = open(io -> JSON.print(io, dict), "$fname.json", "w")?