We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This should be included as a submodule:
The text was updated successfully, but these errors were encountered:
public class JacksonJsonConverter<T> extends AbstractStringConverter<T> { private ObjectMapper mapper = new ObjectMapper() .enable(SerializationFeature.INDENT_OUTPUT) .configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); @Nonnull @Override protected String getStringForm(T entity) { try { return mapper.writeValueAsString(entity); } catch (JsonProcessingException e) { throw new RuntimeException("Could not convert " + entity.getClass() + "object", e); } } }
Sorry, something went wrong.
I think that this converter is more beneficial because it can recursively serialize any other entities within your current one. For example:
class Foo { private String name; private Bar bar; }
class Bar { private String name; private String color; }
As a result if you convert Foo your serialiazed format would look like this:
{ "name" : null, "bar" : { "name" : null, "color" : null } }
Initial implementation for the json converter based on jackson
6b37ed1
Reorganization for modules so the jackson converter doesn't add a hard dependency on jackson for the whole approval project. Closes #13
nikolavp
Successfully merging a pull request may close this issue.
This should be included as a submodule:
The text was updated successfully, but these errors were encountered: