{"id":13565404,"url":"https://github.com/opendatalab-de/geojson-jackson","last_synced_at":"2025-04-03T22:31:16.129Z","repository":{"id":39618147,"uuid":"11447453","full_name":"opendatalab-de/geojson-jackson","owner":"opendatalab-de","description":"GeoJson POJOs for Jackson - serialize and deserialize objects with ease","archived":false,"fork":false,"pushed_at":"2024-06-19T15:43:33.000Z","size":109,"stargazers_count":264,"open_issues_count":24,"forks_count":94,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-11-04T18:46:46.582Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://blog.opendatalab.de","language":"Java","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/opendatalab-de.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,"publiccode":null,"codemeta":null}},"created_at":"2013-07-16T11:00:54.000Z","updated_at":"2024-10-12T03:47:02.000Z","dependencies_parsed_at":"2024-08-01T13:22:09.867Z","dependency_job_id":null,"html_url":"https://github.com/opendatalab-de/geojson-jackson","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendatalab-de%2Fgeojson-jackson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendatalab-de%2Fgeojson-jackson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendatalab-de%2Fgeojson-jackson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendatalab-de%2Fgeojson-jackson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opendatalab-de","download_url":"https://codeload.github.com/opendatalab-de/geojson-jackson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247090134,"owners_count":20881922,"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-08-01T13:01:46.267Z","updated_at":"2025-04-03T22:31:15.585Z","avatar_url":"https://github.com/opendatalab-de.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"GeoJson POJOs for Jackson\n=========================\n\nA small package of all GeoJson POJOs (Plain Old Java Objects) for serializing and \ndeserializing of objects via JSON Jackson Parser. This libary conforms to the 2008 GeoJSON specification.\n\nUsage\n-----\n\nIf you know what kind of object you expect from a GeoJson file you can directly read it like this:\n\n\n```java\nFeatureCollection featureCollection = \n\tnew ObjectMapper().readValue(inputStream, FeatureCollection.class);\n```\n\nIf you want to read any GeoJson file read the value as GeoJsonObject and then test for the contents via instanceOf:\n\n```java\nGeoJsonObject object = new ObjectMapper().readValue(inputStream, GeoJsonObject.class);\nif (object instanceof Polygon) {\n\t...\n} else if (object instanceof Feature) {\n\t...\n}\n```\nand so on.\n\nOr you can use the GeoJsonObjectVisitor to visit the right method:\n\n```java\nGeoJsonObject object = new ObjectMapper().readValue(inputStream, GeoJsonObject.class);\nobject.accept(visitor);\n```\n\n\nWriting Json is even easier. You just have to create the GeoJson objects and pass them to the Jackson ObjectMapper.\n\n```java\nFeatureCollection featureCollection = new FeatureCollection();\nfeatureCollection.add(new Feature());\n\nString json= new ObjectMapper().writeValueAsString(featureCollection);\n```\n\nMaven Central\n-------------\n\nYou can find the library in the Maven Central Repository.\n\n```xml\n\u003cdependency\u003e\n \u003cgroupId\u003ede.grundid.opendatalab\u003c/groupId\u003e\n \u003cartifactId\u003egeojson-jackson\u003c/artifactId\u003e\n \u003cversion\u003e1.14\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\t\t\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendatalab-de%2Fgeojson-jackson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopendatalab-de%2Fgeojson-jackson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendatalab-de%2Fgeojson-jackson/lists"}