require oj gem in to_json module, and whitespace correction