{"id":15044068,"url":"https://github.com/holon-platform/holon-json","last_synced_at":"2025-04-10T00:42:49.574Z","repository":{"id":57725004,"uuid":"93081494","full_name":"holon-platform/holon-json","owner":"holon-platform","description":"Holon Platform JSON support module.","archived":false,"fork":false,"pushed_at":"2023-11-14T14:09:44.000Z","size":538,"stargazers_count":3,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T00:42:42.834Z","etag":null,"topics":["deserialization-support","gson","holon-json","holon-platform","jackson","java-8","jax-rs","json","json-serialization","message-serialization","serialization","spring-configuration","spring-support"],"latest_commit_sha":null,"homepage":"https://holon-platform.com","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/holon-platform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-01T17:15:23.000Z","updated_at":"2023-11-10T21:31:48.000Z","dependencies_parsed_at":"2025-02-16T05:32:26.409Z","dependency_job_id":"e01c24c8-a31e-43bc-a73c-179e460eaa26","html_url":"https://github.com/holon-platform/holon-json","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holon-platform%2Fholon-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holon-platform%2Fholon-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holon-platform%2Fholon-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holon-platform%2Fholon-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holon-platform","download_url":"https://codeload.github.com/holon-platform/holon-json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137998,"owners_count":21053775,"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":["deserialization-support","gson","holon-json","holon-platform","jackson","java-8","jax-rs","json","json-serialization","message-serialization","serialization","spring-configuration","spring-support"],"created_at":"2024-09-24T20:50:01.991Z","updated_at":"2025-04-10T00:42:49.544Z","avatar_url":"https://github.com/holon-platform.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Holon platform JSON module\n\n\u003e Latest release: [5.7.0](#obtain-the-artifacts)\n\nThis is the __JSON__ module of the [Holon Platform](https://holon-platform.com), which provides support for the [JSON](http://www.json.org) data-interchange format using the must popular serialization and deserialization libraries:\n\n* [Jackson](https://github.com/FasterXML/jackson)\n* [Gson](https://github.com/google/gson)\n\nThe module main features are:\n\n* A simple __JSON objects serialization and deserialization API__, to use concrete JSON parsers implementation in a easier and abstract way, providing also useful helper methods for Collections and `PropertyBox` types serialization and deserialization.\n* __JSON__ serialization and deserialization support for the `PropertyBox` platform foundation data container class.\n* __JAX-RS__ configuration and auto-configuration support to enable [Gson](https://github.com/google/gson) as default JSON type messages serialization and deserialization engine with `PropertyBox` support and to enable  `PropertyBox` serialization and deserialization when using [Jackson](http://wiki.fasterxml.com/JacksonHome) as default provider.\n* Full support of the __Java 8 date and time API__: the `java.time.*` data types serialization and deserialization is supported and enabled out-of-the-box.\n* The __ISO-8601__ format is used by default to serialize the `java.util.Date` data types.\n* __Spring__ support to configure `PropertyBox` serialization and deserialization in `RestTemplate` JSON message converters.\n* __Spring Boot__ support to auto-configure `Gson` and `ObjectMapper` instances with `PropertyBox` serialization and deserialization capabilities.\n\nSee the module [documentation](https://docs.holon-platform.com/current/reference/holon-json.html) for details.\n\nJust like any other platform module, this artifact is part of the [Holon Platform](https://holon-platform.com) ecosystem, but can be also used as a _stand-alone_ library.\n\nSee [Getting started](#getting-started) and the [platform documentation](https://docs.holon-platform.com/current/reference) for further details.\n\n## At-a-glance overview\n\n_JSON API - serialization:_\n```java\nJson json = Json.require();\n\nJsonWriter result = json.toJson(myObject);\nString asString = result.asString(); \nbyte[] asBytes = result.asBytes(); \nresult.write(new StringWriter()); \n\t\t\nasString = json.toJsonString(myObject);\n```\n\n_JSON API - deserialization:_\n```java\nJson json = Json.require();\n\nMyObject result = json.fromJson(\"JSON string\", MyObject.class);\n\t\t\nresult = json.fromJson(JsonReader.from(new StringReader(\"JSON string\")), MyObject.class);\n```\n\n_JSON API - Property model:_\n```java\nStringProperty NAME = StringProperty.create(\"name\");\nStringProperty SURNAME = StringProperty.create(\"surname\");\nPropertySet\u003c?\u003e PROPERTY_SET = PropertySet.of(NAME, SURNAME);\n\t\t\nPropertyBox propertyBox = PropertyBox.builder(PROPERTY_SET).set(NAME, \"John\").set(SURNAME, \"Doe\").build();\n\t\t\nJson json = Json.require();\n\t\t\nString jsonValue = json.toJson(propertyBox).asString();\nPropertyBox result = json.fromJson(jsonValue, PROPERTY_SET);\n```\n\n_JSON API - Provider:_\n```java\n// Using Jackson\nJson jsonApi = JacksonJson.create();\n\t\t\n// Using Gson\nJson jsonApi = GsonJson.create();\n```\n\n_Jackson - Property model support:_\n```java\nObjectMapper mapper = JacksonConfiguration.mapper();\n// serialize\nPropertyBox propertyBox = PropertyBox.builder(PROPERTY_SET).set(NAME, \"John\").set(SURNAME, \"Doe\").build();\nString json = mapper.writer().writeValueAsString(propertyBox);\n// deserialize\nPropertyBox value = PROPERTY_SET.execute(() -\u003e mapper.reader().forType(PropertyBox.class).readValue(json));\n```\n\n_Gson - Property model support:_\n```java\nGson gson = GsonConfiguration.builder().create();\n// serialize\nPropertyBox propertyBox = PropertyBox.builder(PROPERTY_SET).set(NAME, \"John\").set(SURNAME, \"Doe\").build();\nString json = gson.toJson(propertyBox);\n// deserialize\nPropertyBox value = PROPERTY_SET.execute(() -\u003e gson.fromJson(json, PropertyBox.class));\n```\n\nSee the [module documentation](https://docs.holon-platform.com/current/reference/holon-json.html) for the user guide and a full set of examples.\n\n## Code structure\n\nSee [Holon Platform code structure and conventions](https://github.com/holon-platform/platform/blob/master/CODING.md) to learn about the _\"real Java API\"_ philosophy with which the project codebase is developed and organized.\n\n## Getting started\n\n### System requirements\n\nThe Holon Platform is built using __Java 11__, so you need a JRE/JDK version 11 or above to use the platform artifacts.\n\n### Releases\n\nSee [releases](https://github.com/holon-platform/holon-json/releases) for the available releases. Each release tag provides a link to the closed issues.\n\n### Obtain the artifacts\n\nThe [Holon Platform](https://holon-platform.com) is open source and licensed under the [Apache 2.0 license](LICENSE.md). All the artifacts (including binaries, sources and javadocs) are available from the [Maven Central](https://mvnrepository.com/repos/central) repository.\n\nThe Maven __group id__ for this module is `com.holon-platform.json` and a _BOM (Bill of Materials)_ is provided to obtain the module artifacts:\n\n_Maven BOM:_\n```xml\n\u003cdependencyManagement\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.holon-platform.json\u003c/groupId\u003e\n        \u003cartifactId\u003eholon-json-bom\u003c/artifactId\u003e\n        \u003cversion\u003e5.7.0\u003c/version\u003e\n        \u003ctype\u003epom\u003c/type\u003e\n        \u003cscope\u003eimport\u003c/scope\u003e\n    \u003c/dependency\u003e\n\u003c/dependencyManagement\u003e\n```\n\nSee the [Artifacts list](#artifacts-list) for a list of the available artifacts of this module.\n\n### Using the Platform BOM\n\nThe [Holon Platform](https://holon-platform.com) provides an overall Maven _BOM (Bill of Materials)_ to easily obtain all the available platform artifacts:\n\n_Platform Maven BOM:_\n```xml\n\u003cdependencyManagement\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.holon-platform\u003c/groupId\u003e\n        \u003cartifactId\u003ebom\u003c/artifactId\u003e\n        \u003cversion\u003e${platform-version}\u003c/version\u003e\n        \u003ctype\u003epom\u003c/type\u003e\n        \u003cscope\u003eimport\u003c/scope\u003e\n    \u003c/dependency\u003e\n\u003c/dependencyManagement\u003e\n```\n\nSee the [Artifacts list](#artifacts-list) for a list of the available artifacts of this module.\n\n### Build from sources\n\nYou can build the sources using Maven (version 3.3.x or above is recommended) like this: \n\n`mvn clean install`\n\n## Getting help\n\n* Check the [platform documentation](https://docs.holon-platform.com/current/reference) or the specific [module documentation](https://docs.holon-platform.com/current/reference/holon-json.html).\n\n* Ask a question on [Stack Overflow](http://stackoverflow.com). We monitor the [`holon-platform`](http://stackoverflow.com/tags/holon-platform) tag.\n\n* Report an [issue](https://github.com/holon-platform/holon-json/issues).\n\n* A [commercial support](https://holon-platform.com/services) is available too.\n\n## Examples\n\nSee the [Holon Platform examples](https://github.com/holon-platform/holon-examples) repository for a set of example projects.\n\n## Contribute\n\nSee [Contributing to the Holon Platform](https://github.com/holon-platform/platform/blob/master/CONTRIBUTING.md).\n\n[![Gitter chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/holon-platform/contribute?utm_source=share-link\u0026utm_medium=link\u0026utm_campaign=share-link) \nJoin the __contribute__ Gitter room for any question and to contact us.\n\n## License\n\nAll the [Holon Platform](https://holon-platform.com) modules are _Open Source_ software released under the [Apache 2.0 license](LICENSE).\n\n## Artifacts list\n\nMaven _group id_: `com.holon-platform.json`\n\nArtifact id | Description\n----------- | -----------\n`holon-json` | Holon JSON objects serialization and deserialization core API\n`holon-gson` | Base [Gson](https://github.com/google/gson) configuration for `PropertyBox` serialization and deserialization support\n`holon-gson-jaxrs` | __JAX-RS__ configuration support to use [Gson](https://github.com/google/gson) as JSON type messages serializer/deserializer\n`holon-gson-spring` | Spring `RestTemplate` configuration and `Gson` Spring Boot auto-configuration\n`holon-jackson` | Base [Jackson](http://wiki.fasterxml.com/JacksonHome) configuration for `PropertyBox` serialization and deserialization support\n`holon-jackson-jaxrs` | __JAX-RS__ configuration support for [Jackson](http://wiki.fasterxml.com/JacksonHome) to enable `PropertyBox` serialization and deserialization in JSON format\n`holon-jackson-spring` | Spring `RestTemplate` configuration and `ObjectMapper` Spring Boot auto-configuration\n`holon-json-bom` | Bill Of Materials\n`holon-json-bom-platform` | Bill Of Materials with external dependencies\n`documentation-json` | Documentation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholon-platform%2Fholon-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholon-platform%2Fholon-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholon-platform%2Fholon-json/lists"}