{"id":13498318,"url":"https://github.com/eunjae-lee/ModelMapper","last_synced_at":"2025-03-29T01:30:20.273Z","repository":{"id":14122023,"uuid":"16827088","full_name":"eunjae-lee/ModelMapper","owner":"eunjae-lee","description":"An android library to map json string to model objects automatically based on annotations.","archived":false,"fork":false,"pushed_at":"2018-06-23T04:39:57.000Z","size":67,"stargazers_count":20,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-31T15:38:46.296Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eunjae-lee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-14T04:33:45.000Z","updated_at":"2019-05-07T02:35:17.000Z","dependencies_parsed_at":"2022-08-24T05:31:45.498Z","dependency_job_id":null,"html_url":"https://github.com/eunjae-lee/ModelMapper","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eunjae-lee%2FModelMapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eunjae-lee%2FModelMapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eunjae-lee%2FModelMapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eunjae-lee%2FModelMapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eunjae-lee","download_url":"https://codeload.github.com/eunjae-lee/ModelMapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246125305,"owners_count":20727406,"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":[],"created_at":"2024-07-31T21:00:22.027Z","updated_at":"2025-03-29T01:30:20.021Z","avatar_url":"https://github.com/eunjae-lee.png","language":"Java","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"***THIS REPOSITORY IS NO LONGER MAINTAINED.***\n\nModelMapper\n===========\n\nModelMapper is an Android library to help parsing JSON strings and mapping it to objects of model classes automatically.\n\nThis is your json.\n```json\n{\n  \"name\": \"Eunjae Lee\",\n  \"noshow\": false,\n  \"albuminfo\": {\n    \"count\": 10\n  }\n}\n\n```\n\nThis is your model.\n\n```java\nclass User {\n  \n  String name;\n  \n  @JsonProperty(\"noshow\")\n  boolean noShow;\n  \n  @JsonProperty(\"albuminfo.count\")\n  int albumCount;\n}\n```\n\nAnd all you need to do is:\n\n```java\nUser user = ModelMapper.getInstance().generate(User.class, jsonString);\n```\n\nAnd if you're using AndroidAnnotations, it gets simpler. You just need to put an converter at rest client interface.\n\n```java\n@Rest(converters = {JsonToModelConverter.class})\npublic interface MyRestClient {\n \n  @Get(\"/...\")\n  User getUser();\n}\n```\n\nIt's done.\n\n# Download\n\n## Maven\n\n```xml\n  \u003cdependency\u003e\n    \u003cgroupId\u003enet.eunjae.android.modelmapper\u003c/groupId\u003e\n    \u003cartifactId\u003eModelMapper\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.6\u003c/version\u003e\n  \u003c/dependency\u003e\n```\n## Gradle\n\n```\n  compile 'net.eunjae.android.modelmapper:ModelMapper:1.0.6'\n```\n\n# Usage Documentation\n\nCheck out the wiki page: https://github.com/eunjae-lee/ModelMapper/wiki\n\n# License\n[MIT](http://opensource.org/licenses/mit-license.html)\n\n# Changelog\n\n## 1.0.6 (2014/03/12)\n\n* OnBeforeMapping has changed a little bit.\n* A field with \"HashMap\" type is now mapped well.\n* Null check\n\n## 1.0.5 (2014/03/06)\n\n* Bugs are fixed when it can't parse json strings with unusual structure.\n* Test cases are added.\n\n## 1.0.4\n\n* Now ModelMapper just returns json string if the first argument of ModelMapper.getInstance().generate(...) is String.class.\n** There was a bug that it returned an empty string in that case.\n\n## 1.0.3\n\n* Now this library throws exceptions when callback method(@AfterMapping) is not declared properly.\n\n## 1.0.2\n\n* Minor bug fix that couldn't recognize array class when it is not directly extending ArrayList.\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/eunjae-lee/modelmapper/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feunjae-lee%2FModelMapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feunjae-lee%2FModelMapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feunjae-lee%2FModelMapper/lists"}