In addition to the solution you've already found, you can consider two more solutions. One registering the Hibernate4Module with the ObjectMapper, which will register HibernateProxySerializer, already equipped with the intelligence to deal with proxies, you can check the code not difficult to understand. Registering is also quite straight forward, form their docs:
public class HibernateAwareObjectMapper extends ObjectMapper {
public HibernateAwareObjectMapper() {
registerModule(new Hibernate4Module());
}
}
than register
Another solution is to use a DTO object, adds some boiler plate code when copying values from an entity, but gives you more control and decouples the representation from the an actual entity