Java Jackson opcjonalnie

ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new Jdk8Module());
String jsonString = mapper.writeValueAsString(optionalObject);
Outstanding Owl