TouK contest – some important rules

By entering TouK contest at 33rd Degree Conference you are accepting these simple conditions:

  1. The contest is open to all 33rd Degree Conference participians, except TouK people and their family members, of course (sorry, guys).
  2. To take part, you must collect two TouK feathers (in two different colours) and hack an application. The apllication is avaliable at http://reg.touk.pl. Then you must write down the solution (with your name and surname) on a sheet of paper received at our stand. and leave it to us to enter a prize draw. You must have TouK feathers in both colors with you.
  3. Only one entry is allowed per person.
  4. The prizes are 6 Raspberry Pi computers (2 per each conference day).
  5. All entries (except the winners’) will be rolled over into subsequent draws.
  6. All prize draws take place at our stand in following dates: ·Day 1, 13 of March – 16:30 ·Day 2, 14 of March – 15:50 ·Day 3, 15 of March – 12:50
  7. Only correct and complete solutions will be awarded.
  8. The winner have to be present during the prize draw. If not, we reserve the right to award the prize to an alternative winner, drawn in accordance with these terms and conditions.
  9. If you have any questions about how to enter or in connection with the contest, please ask at TouK’s stand.
You May Also Like

Grails render as JSON catch

One of a reasons your controller doesn't render a proper response in JSON format might be wrong package name that you use. It is easy to overlook. Import are on top of a file, you look at your code and everything seems to be fine. Except response is still not in JSON format.

Consider this simple controller:

class RestJsonCatchController {
def grailsJson() {
render([first: 'foo', second: 5] as grails.converters.JSON)
}

def netSfJson() {
render([first: 'foo', second: 5] as net.sf.json.JSON)
}
}

And now, with finger crossed... We have a winner!

$ curl localhost:8080/example/restJsonCatch/grailsJson
{"first":"foo","second":5}
$ curl localhost:8080/example/restJsonCatch/netSfJson
{first=foo, second=5}

As you can see only grails.converters.JSON converts your response to JSON format. There is no such converter for net.sf.json.JSON, so Grails has no converter to apply and it renders Map normally.

Conclusion: always carefully look at your imports if you're working with JSON in Grails!

Edit: Burt suggested that this is a bug. I've submitted JIRA issue here: GRAILS-9622 render as class that is not a codec should throw exception