Y
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
tom-lord
4163 days ago
f << JSON.dump(showings)
avoids adding any new lines (not that it really matters in the case of JSON)
link
cheald
4163 days ago
Doh, yes. `print` rather than `puts` is also acceptable.
link