πJackson Module
How to serialize Result objects with Jackson
How to Use this Add-On
Group ID
Artifact ID
Latest Version
Test Scenario
/** Represents an API response */
public class ApiResponse {
@JsonProperty
String version;
@JsonProperty
Result<String, String> result;
// Constructors, getters and setters omitted
}Problem Overview
Serialization Problem
Deserialization Problem
Solution Implementation
Registering the Jackson Datatype Module for Result
Serializing Results
Deserializing Results
Conclusion
Last updated
Was this helpful?