Features
Fixture monkey supports Jackson 3 with the Fixture Monkey Jackson3 plugin.
Jackson 3 requires JDK 17 or higher. If you are using JDK 8, please use the Jackson Plugin instead.
- Supports the use of
Jackson3ObjectArbitraryIntrospectoras the default introspector to create objects using the Jackson 3 object mapper. - Supports Jackson Annotations such as,
@JsonIgnore,@JsonProperty
Dependencies
Gradle
testImplementation("com.navercorp.fixturemonkey:fixture-monkey-jackson3:1.1.16")
Maven
<dependency>
<groupId>com.navercorp.fixturemonkey</groupId>
<artifactId>fixture-monkey-jackson3</artifactId>
<version>1.1.16</version>
<scope>test</scope>
</dependency>
Plugin
- Java
- Kotlin
FixtureMonkey fixtureMonkey = FixtureMonkey.builder()
.plugin(new Jackson3Plugin())
.build();
val fixtureMonkey = FixtureMonkey.builder()
.plugin(Jackson3Plugin())
.build()
Pass the object mapper to the Jackson3Plugin constructor if you are using Jackson 3 with a custom object mapper.
- Java
- Kotlin
ObjectMapper objectMapper = JsonMapper.builder()
.findAndAddModules()
.build();
FixtureMonkey fixtureMonkey = FixtureMonkey.builder()
.plugin(new Jackson3Plugin(objectMapper))
.build();
val objectMapper = JsonMapper.builder()
.findAndAddModules()
.build()
val fixtureMonkey = FixtureMonkey.builder()
.plugin(Jackson3Plugin(objectMapper))
.build()