Added rspec tests for json_attributes option and fixed indentation