Introducing ShapeShift: A lightweight, modular, performant and extensible object mapping library for Kotlin/Java

Search for a command to run...

No comments yet. Be the first to comment.
What is Ostara Ostara is a modern tool for managing and monitoring actuator-enabled microservices that aims to make the process more user-friendly and straightforward. One of our main goals with Ostara was to create a tool that just works out of the ...

The Strategy Pattern If you already know the strategy pattern just jump to "The Library" section. What is it? According to Wikipedia, the strategy pattern is a behavioral software design pattern that enables selecting an algorithm at runtime. Instead...

The stack — Java, GWT, Mysql The Experience — 11 Years The Job — Senior Developer at Startup — Teaching some new recruits It was my 3rd year at the startup, things were going well, the company was growing. We needed more working hands, so like any co...

This is the Java version of the Kotlin article. When working with multi-layered applications, external libraries, a legacy code base or external APIs, we are often required to map between different objects or data structures. In this tutorial, we wil...

We needed a simple to use, minimal boiler plate mapping engine, that is also flexible and supports the most advanced use cases.
A few years ago we got tired of developing the same boiler plate code for CRUD and decided to develop a generic CRUD framework.
As a part of this framework we needed an object mapping library and could not find one that answered all of our requirements.
The first iteration of the library was part of the entire CRUD framework. However, some time ago we decided we want to start contributing to the open source community and we thought "What is the best way to contribute if not to release our CRUD framework?". The issue with this thought is that the framework is huge and contains lots of code, polishing it and getting it ready to be published as open source would take a lot of time (documentation anyone?).
Our solution was to separate the framework into multiple smaller libraries we can polish and publish in smaller time frames. The first of these libraries is ShapeShift.
ShapeShift will help you transform object of type A to object of type B easily, fast and without boiler plate code.
ShapeShift main features:
ShapeShift's job seems simple, convert object of type A to object of type B. But to do its job in the best way possible, the library offers lots of features, to name a few:
More about the advanced features with code examples is available in Kotlin version and Java version.
ShapeShift supports multiple APIs to configure your mappings. Annotations, Kotlin DSL and Java Builder.
ShapeShift's documentation is available here. You can check our Quick Start guide to get it up and running in 5 minutes.
Built with Kotlin in mind, ShapeShift was designed around its ecosystem and best practices. The library APIs for mapping with Kotlin:
ShapeShift also has full Java support available with multiple APIs for mapping:
We poured our love, time, knowledge and what not into ShapeShift. I'm proud of the result and our greatest achievement is to be able to help others with their work.
If you would like to contribute, please feel free to open issues, join as a contributor or star the repository. Thanks in advance!