Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 30th, 2012  |  syntax: None  |  size: 1.56 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Rails UTF-8 response
  2. { "_id" : ObjectId("4f986cbe4c8086fdc9000002"), "created_at" : ISODate("2012-04-25T21:31:45.474Z"), "updated_at" : ISODate("2012-04-26T22:07:23.901Z"), "creator_id" : ObjectId("4f6b4d3c4c80864381000001"), "updater_id" : null, "name" : "Trädgår'n", "sort" : "tradgarn", "address" : "Nya Allén 11", "coordinates" : [ 11.9764791, 57.7045625 ], "phone" : "46031102080", "url" : "http://www.profilrestauranger.se/tradgarn/", "user_ids" : [ ] }
  3.        
  4. {"address":"Nya Allu00e9n 11","coordinates":[11.9764791,57.7045625],"created_at":"2012-04-25T23:31:45+02:00","id":"4f986cbe4c8086fdc9000002","name":"Tru00e4dgu00e5r'n","phone":"46031102080","sort":"tradgarn","updated_at":"2012-04-27T00:07:23+02:00","url":"http://www.profilrestauranger.se/tradgarn/"}
  5.        
  6. HTTP/1.1 200 OK
  7. Server: nginx/1.2.0
  8. Date: Thu, 26 Apr 2012 22:41:13 GMT
  9. Content-Type: application/json; charset=utf-8
  10. Content-Length: 909
  11. Connection: keep-alive
  12. Status: 200 OK
  13. Access-Control-Allow-Origin: *
  14. Access-Control-Allow-Methods: POST, GET, OPTIONS
  15. Access-Control-Max-Age: 1000
  16. Access-Control-Allow-Headers: *,x-requested-with
  17. X-UA-Compatible: IE=Edge
  18. ETag: "d2a95f06bec10d8087c3188280292d3c"
  19. Cache-Control: max-age=0, private, must-revalidate
  20. X-Request-Id: fdd042568195df279e59affe45bdcd37
  21. X-Runtime: 0.037134
  22.        
  23. user.to_json
  24.  
  25. #  => "{"created_at":"2012-04-19T18:48:01Z","email":"tr\u00e4dg\u00e5r@example.com","id":10,"updated_at":"2012-04-27T18:37:10Z"}"
  26.        
  27. JSON.generate(user.as_json)
  28.  
  29. #  => "{"created_at":"2012-04-19T18:48:01Z","email":"trädgår@example.com","id":10,"updated_at":"2012-04-27T18:37:10Z"}"