I remember once you asked whether Wicket's embedded JSON library can serialize objects. You may find simple impl at https://github.com/martin-g/wicket-ractive/blob/master/src/main/java/com/mycompany/json/JsonObject.java