This project defines a set of Java API definitions designed to provide a common abstraction for various data conversions. By using these APIs, you can decouple your application's core logic from specific third-party library implementations (such as Jackson, Gson, or others), making it easier to switch between them or support multiple implementations.
Under construction 🚧
The json-convertion-api library provides a unified interface for JSON serialization and deserialization.
- Generic Abstraction: Works with any JSON library through the
JsonConverterinterface. - Support for Common Data Types: Methods for converting objects, lists, sets, and maps.
- Custom Exceptions: Uses
JsonConversionExceptionfor consistent error handling across different implementations. - Delegate Access: Allows access to the underlying library's native object (e.g.,
JsonMapperin Jackson) when needed.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.petromirdzhunev</groupId>
<artifactId>java-conversions-apis-bom</artifactId>
<version>${java_conversions_apis_bom_version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>replace ${java_comersions_apis_bom_version} with the last version.
Once bom is in place, add the conversion API of choice
<dependencies>
<dependency>
<groupId>com.petromirdzhunev</groupId>
<artifactId>json-convertion-api</artifactId>
</dependency>
</dependencies>- Install SDKMAN
- Initialize SDKMAN environment
sdk env installCheck .sdkmanrc for all the tools installed with this command.
Change the version by adding a -SNAPSHOT suffix in the pom.xml file and then execute:
mvnd -B clean install<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.petromirdzhunev</groupId>
<artifactId>java-comersions-apis-bom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>