Skip to main content
Version: v1.0.x

Features

Fixture monkey supports Jackson with the Fixture Monkey Jackson plugin.

  • Supports the use of JacksonObjectArbitraryIntrospector as the default introspector to create objects using the Jackson object mapper.
  • Supports Jackson Annotations such as, @JsonIgnore, @JsonProperty

Dependencies

Gradle

testImplementation("com.navercorp.fixturemonkey:fixture-monkey-jackson:1.0.20")

Maven

<dependency>
<groupId>com.navercorp.fixturemonkey</groupId>
<artifactId>fixture-monkey-jackson</artifactId>
<version>1.0.20</version>
<scope>test</scope>
</dependency>

Plugin

FixtureMonkey fixtureMonkey = FixtureMonkey.builder()
.plugin(new JacksonPlugin())
.build();

Pass the object mapper to the JacksonPlugin constructor if you are using Jackson with a custom object mapper.

ObjectMapper objectMapper = JsonMapper.builder()
.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
.build()

FixtureMonkey fixtureMonkey = FixtureMonkey.builder()
.plugin(new JacksonPlugin(objectMapper))
.build();