Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Post Timeline

added 2 characters in body
Source Link
George Stocker
  • 58k
  • 29
  • 185
  • 239

"application/json""application/json" is the correct JSON content type.

def ajaxFindSystems = {
 def result = Systems.list()
 render(contentType:'application/json') {
 results {
 result.each{sys->
 system(id:sys.id, name:sys.name)
 }
 }
 resultset (rows:result.size())
 }
}

"application/json" is the correct JSON content type.

def ajaxFindSystems = {
 def result = Systems.list()
 render(contentType:'application/json') {
 results {
 result.each{sys->
 system(id:sys.id, name:sys.name)
 }
 }
 resultset (rows:result.size())
 }
}

"application/json" is the correct JSON content type.

def ajaxFindSystems = {
 def result = Systems.list()
 render(contentType:'application/json') {
 results {
 result.each{sys->
 system(id:sys.id, name:sys.name)
 }
 }
 resultset (rows:result.size())
 }
}
Source Link
Sukane
  • 2.7k
  • 3
  • 20
  • 19

"application/json" is the correct JSON content type.

def ajaxFindSystems = {
 def result = Systems.list()
 render(contentType:'application/json') {
 results {
 result.each{sys->
 system(id:sys.id, name:sys.name)
 }
 }
 resultset (rows:result.size())
 }
}
default

AltStyle によって変換されたページ (->オリジナル) /