Fix for `#to_json` on empty hash creating bad params payload

This is a proposed patch for issue #183 where a route without specified parameters would generate a invalid JSON payload of `{"{}" => nil}`