Skip to content

Instantly share code, notes, and snippets.

@mresetar
Created June 8, 2011 13:18
Show Gist options
  • Save mresetar/1014399 to your computer and use it in GitHub Desktop.
Save mresetar/1014399 to your computer and use it in GitHub Desktop.
Groovy ToJsonSucks
import groovy.json.JsonOutput
class User {
def ime
def prezime
}
def u = new User(ime:'Ime', prezime:'Prezime')
use (JsonOutput) {
println u.toJson()
println u.ime.toJson()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment