Hacker News new | ask | show | jobs
by cheald 4163 days ago
Or, you can write it from within Ruby:

    open("out.json", "w") {|f| f.puts JSON.dump(showings) }
1 comments

    f << JSON.dump(showings)
avoids adding any new lines (not that it really matters in the case of JSON)
Doh, yes. `print` rather than `puts` is also acceptable.