Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5848e37

Browse files
committed
use JSON.generate in ruby
1 parent be57a92 commit 5848e37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
# always return json
2929
res['Content-Type'] = 'application/json'
30-
res.body = comments.to_json
30+
res.body = JSON.generate(comments)
3131
end
3232

3333
trap 'INT' do server.shutdown end

0 commit comments

Comments
 (0)