{"id":24968353,"url":"https://github.com/data2viz/geojson-kotlin","last_synced_at":"2025-07-25T22:34:45.867Z","repository":{"id":47446079,"uuid":"122206793","full_name":"data2viz/geojson-kotlin","owner":"data2viz","description":"Multiplatform geojson serialization for kotlin","archived":false,"fork":false,"pushed_at":"2023-02-17T23:40:27.000Z","size":1724,"stargazers_count":21,"open_issues_count":5,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T03:07:32.222Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","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/data2viz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"license/LICENSE.txt","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-02-20T14:11:36.000Z","updated_at":"2024-12-05T09:29:24.000Z","dependencies_parsed_at":"2025-04-11T03:07:40.367Z","dependency_job_id":"0fadf355-4d7c-4f8b-8c7f-d80142d79294","html_url":"https://github.com/data2viz/geojson-kotlin","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/data2viz/geojson-kotlin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data2viz%2Fgeojson-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data2viz%2Fgeojson-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data2viz%2Fgeojson-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data2viz%2Fgeojson-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/data2viz","download_url":"https://codeload.github.com/data2viz/geojson-kotlin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data2viz%2Fgeojson-kotlin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267072921,"owners_count":24031475,"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","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-02-03T13:17:57.110Z","updated_at":"2025-07-25T22:34:45.780Z","avatar_url":"https://github.com/data2viz.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"GeoJson Kotlin\n=========================\n\n[![Build Status](https://travis-ci.org/data2viz/geojson-kotlin.svg?branch=master)](https://travis-ci.org/data2viz/geojson-kotlin)\n[![GitHub License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)\n\n\nThis project goal is to provide [GeoJson](https://tools.ietf.org/html/rfc7946) deserialization for kotlin multiplatform (JVM, JS).\n\n\n\n\n\nThe specific format of GeoJson files does not allow the use of kotlinx.serialization. JS and\nJVM implementations are completely distinct but they share the same base objects and interfaces.\n\nJVM implementation is based on the project [GeoJson-Jackson](https://github.com/opendatalab-de/geojson-jackson).\n\n## Using in your projects\n\nThe library is published to data2viz space repository.\n\n\n\n### Gradle\n\n- Add the data2viz maven repository:\n\n```kotlin\nrepositories {\n    maven { url = uri(\"https://maven.pkg.jetbrains.space/data2viz/p/maven/public\") }\n}\n```\n\nThe project is deployed using Gradle metadata. You can use the dependency\non Gradle Metadata. Depending on your platform (JS or JVM) the correct\nartifact will be imported.\n\n```groovy\n    compile 'io.data2viz.geojson:core:0.6.6'\n```\n\nThe JS version is available in [both modes](https://kotlinlang.org/docs/reference/js-ir-compiler.html), `Legacy` and `IR`.\n\nYou can then use the String extension toGeoJsonObject to transform any String into a GeoJsonObject:\n\n```kotlin\nval featureCollection = json.toGeoJsonObject() as FeatureCollection\n```\n\nIf you deserialize a FeatureCollection that have properties (main use case) you\nneed to pass a function that transform the properties in a specific domain object.\n\n```kotlin\nclass CountryProperties(val name: String, val id: Int)\n\nval countries = countriesGeoJson.toFeatures {\n        CountryProperties(stringProperty(\"name\"), intProperty(\"id\"))\n}\n```\n\nYou then retrieve a list of `Pair\u003cFeature, CountryPropertiess\u003e`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdata2viz%2Fgeojson-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdata2viz%2Fgeojson-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdata2viz%2Fgeojson-kotlin/lists"}