{"id":20650938,"url":"https://github.com/coolsamson7/mappit","last_synced_at":"2026-05-28T06:45:47.588Z","repository":{"id":231554223,"uuid":"782040272","full_name":"coolsamson7/mappit","owner":"coolsamson7","description":"kotlin mapping framework","archived":false,"fork":false,"pushed_at":"2024-04-10T19:41:44.000Z","size":429,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-14T06:27:51.453Z","etag":null,"topics":["kotlin","mapper","mapping-framework","object-mapper"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coolsamson7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-04T14:21:08.000Z","updated_at":"2024-04-15T08:38:55.443Z","dependencies_parsed_at":"2024-04-15T08:38:55.214Z","dependency_job_id":"75d794d6-ad9a-44c9-9efd-a122ae95091a","html_url":"https://github.com/coolsamson7/mappit","commit_stats":null,"previous_names":["coolsamson7/mappit"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolsamson7%2Fmappit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolsamson7%2Fmappit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolsamson7%2Fmappit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolsamson7%2Fmappit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coolsamson7","download_url":"https://codeload.github.com/coolsamson7/mappit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242750783,"owners_count":20179256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kotlin","mapper","mapping-framework","object-mapper"],"created_at":"2024-11-16T17:24:37.133Z","updated_at":"2026-05-28T06:45:40.551Z","avatar_url":"https://github.com/coolsamson7.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Java CI with Maven](https://github.com/coolsamson7/mappit/actions/workflows/maven.yml/badge.svg)](https://github.com/coolsamson7/mappit/actions/workflows/maven.yml)\n# Mappit\n\n`Mappit` is a pure Kotlin object mapper framework used to avoid boilerplate and error prone manual mapping code vastly simplifying the implementation of typical use-cases ( DTO/Entity conversions, etc. )\n\nThe basic idea is to rely on a declarative approach to specify the mapping logic. In contrast to various other - mostly java based - implementations, it is completely non-invasive and does not require any changes to the affected classes ( e.g. by adding annotations ).\n\nThe other unique detail, that it supports complex data structures on the target side of any level, including classes, that set `val` properties as constructor arguments only.\n\nLet's look at a simple example:\n\nAssuming classes `ProductEntity`, `ProductTO`, `PartEntity`, `PartTO` and an immutable data class `Money`, the following DSL like call would specify the required operations\n\n```kotlin\nval mapper = mapper {\n    mapping(ProductEntity::class, ProductTO::class) {\n        map { \"priceCurrency\" to path(\"price\", \"currency\") }\n        map { \"priceValue\" to path(\"price\", \"value\") }\n        map { \"parts\" to \"parts\" deep true }\n        map { matchingProperties() except properties(\"parts\") }\n     }\n\n    mapping(PartEntity::class, PartTO::class) {\n        map { matchingProperties() }\n     }\n}\n```\nand could be used by calling one of the various map methods, such as\n\n```kotlin\nval result = mapper.map\u003cProductTO\u003e(productEntity)\n```\n\n# Features\n\nImplemented features are\n\n* fully type-safe. All operations are verified according to the involved types\n* with the help of lambdas and infix operators a quite readable DSL like spec\n* one-to-one and wild-card mappings\n* integration of constant values as sources\n* mapping of paths as source or target operations\n* handling of immutable classes ( by collecting constructor arguments )\n* support of deep mappings, including handling of cycles\n* mapping of different collection types in each other ( list, array, ... )\n* inheritance of mapping definitions\n* automatic conversions of the different primitive types ( short, float, etc. )\n* manual conversions inside a mapping or as a general rule in a mapper\n\n# Performance\n\nAs this topic is often discussed, Mappit is pretty FAST!\n\nAll operations are translated - with the help of javassist - to plain Java-Code which enables performance near manual code...\n\nA simple benchmark copying an object with 10 properties was executed with\n* Mappit\n* [Shapeshift](https://github.com/krud-dev/shapeshift)\n* [Model Mapper](http://modelmapper.org)\n\n100000 loops took\n|Library|Time|Avg|\n|---|---|---|\n| ModelMapper | 522ms | 0.00522 |\n| ShapeShift | 56ms | 5.6E-4 |\n| Mappit |  10ms | 1.0E-4 |\n\nCheck out the corresponding [Wiki](https://github.com/coolsamson7/mappit/wiki) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolsamson7%2Fmappit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoolsamson7%2Fmappit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolsamson7%2Fmappit/lists"}