Ruby, being a Perl-inspired language, has `.to_json` built in. You can do
```rb
# hashes
{ foo: 'bar' }.to_json
# numbers
28.to_json
# anything really
['hello', 42, { lorem: "ipsum" }].to_json
```