Skip to content

A support library providing a Jackson module for the Omittable library to support serializing and deserializing omittable types.

License

Notifications You must be signed in to change notification settings

Osmerion/omittable-jackson

Repository files navigation

Omittable - Jackson Integration

License Maven Central JavaDoc Java

A support library providing a Jackson module for the Omittable library to support serializing and deserializing omittable types.

Usage

ObjectMapper mapper = JsonMapper.builder()
    .addModule(new OmittableModule())
    .build();

UserDto user = mapper.readValue(
    """
    {
        "name": "John Doe"
    }
    """,
    UserDto.class
);

assert user.name().isPresent();
assert user.birthday().isAbsent();

Compatibility

Jackson Omittable - Jackson Integration
3.x 2.x
2.x 0.x, 1.x

Building from source

Setup

This project uses Gradle's toolchain support to detect and select the JDKs required to run the build. Please refer to the build scripts to find out which toolchains are requested.

An installed JDK 17 (or later) is required to use Gradle.

Building

Once the setup is complete, invoke the respective Gradle tasks using the following command on Unix/macOS:

./gradlew <tasks>

or the following command on Windows:

gradlew <tasks>

Important Gradle tasks to remember are:

  • clean - clean build results
  • build - assemble and test the project
  • publishToMavenLocal - build and install all public artifacts to the local maven repository

Additionally tasks may be used to print a list of all available tasks.

License

Copyright 2025-2026 Leon Linhart

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

A support library providing a Jackson module for the Omittable library to support serializing and deserializing omittable types.

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages