Grails

json content-type should not be "text/json"

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.1
  • Fix Version/s: 1.0.2
  • Component/s: None
  • Labels:
    None

Description

according to wikipedia http://en.wikipedia.org/wiki/JSON and yahoo yui references http://tech.groups.yahoo.com/group/ydn-javascript/message/25534
the content-type for json should be "application/json" not "text/json"

render(contentType:"application/json") { 
    book(title:b.title,author:b.author)
}

Activity

Hide
Drew Varner added a comment -

Attached is a patch for the issue. I don't have a JSON application test it with but this seems like the logical solution.

Show
Drew Varner added a comment - Attached is a patch for the issue. I don't have a JSON application test it with but this seems like the logical solution.
Hide
Graeme Rocher added a comment -

patch applied. Thanks drew

Show
Graeme Rocher added a comment - patch applied. Thanks drew

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: