Injector injector = Guice.createInjector(new JsonModule(),
new Module()
{
public void configure(Binder binder)
{
JsonCodecBinder codecBinder = jsonCodecBinder(binder);
codecBinder.bindJsonCodec(Person.class);
codecBinder.bindListJsonCodec(Person.class);
codecBinder.bindMapJsonCodec(String.class, Person.class);
}
});
injector.injectMembers(this);