changed JSON.to_json to use default options