{"id":30872302,"url":"https://github.com/marhali/json5-java","last_synced_at":"2025-09-07T22:31:54.397Z","repository":{"id":38195053,"uuid":"461990432","full_name":"marhali/json5-java","owner":"marhali","description":"This is a lightweight library to parse and serialize JSON5 data.","archived":false,"fork":false,"pushed_at":"2025-09-03T20:37:27.000Z","size":94,"stargazers_count":15,"open_issues_count":7,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-03T21:26:17.410Z","etag":null,"topics":["java","json5","library","parser","serializer"],"latest_commit_sha":null,"homepage":"","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/marhali.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-21T18:48:07.000Z","updated_at":"2025-09-03T20:37:27.000Z","dependencies_parsed_at":"2025-09-03T21:15:21.791Z","dependency_job_id":"5b8ca592-73bd-48d0-b2c1-657d771c214f","html_url":"https://github.com/marhali/json5-java","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marhali/json5-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marhali%2Fjson5-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marhali%2Fjson5-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marhali%2Fjson5-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marhali%2Fjson5-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marhali","download_url":"https://codeload.github.com/marhali/json5-java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marhali%2Fjson5-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274106836,"owners_count":25223441,"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-09-07T02:00:09.463Z","response_time":67,"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":["java","json5","library","parser","serializer"],"created_at":"2025-09-07T22:06:12.013Z","updated_at":"2025-09-07T22:31:54.383Z","avatar_url":"https://github.com/marhali.png","language":"Java","funding_links":["https://paypal.me/marhalide"],"categories":[],"sub_categories":[],"readme":"# json5-java \n[![Build](https://img.shields.io/github/actions/workflow/status/marhali/json5-java/cd.yml?branch=main)](https://github.com/marhali/json5-java/actions)\n[![JavaDoc](https://javadoc.io/badge2/de.marhali/json5-java/javadoc.svg)](https://javadoc.io/doc/de.marhali/json5-java)\n[![Coverage](https://img.shields.io/codecov/c/github/marhali/json5-java)](https://codecov.io/gh/marhali/json5-java)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/marhalide)\n\nThis is a reference implementation of the [JSON5 standard](https://json5.org/) in Java 11+, \ncapable of parsing and serialization of JSON5 data.\n\nThis library is an enhanced version of [Synt4xErr0r4 / json5](https://github.com/Synt4xErr0r4/json5), \nwhich provides a better full-fledged API inspired by the [GSON](https://github.com/google/gson) library.\n\n## Download\nDownload the [latest release](https://search.maven.org/artifact/de.marhali/json5-java) manually or add a Maven dependency. \nDon't worry the project is already in the Maven Central Repository. Just add the following configuration:\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ede.marhali\u003c/groupId\u003e\n        \u003cartifactId\u003ejson5-java\u003c/artifactId\u003e\n        \u003cversion\u003e2.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n## Usage\nThis library can be used by either configuring a [Json5](src/main/java/de/marhali/json5/Json5.java) \ninstance or by using the underlying [Json5Parser](src/main/java/de/marhali/json5/stream/Json5Parser.java) \nand [Json5Writer](src/main/java/de/marhali/json5/stream/Json5Writer.java).\n\nThe following section describes how to use this library with the \n[Json5](src/main/java/de/marhali/json5/Json5.java) core class.\n\n### Configure Json5 instance\nSee [Parsing \u0026 Serialization Options](#parsing--serialization-options) to see a list of possible configuration options.\n```java\n// Using builder pattern\nJson5 json5 = Json5.builder(options -\u003e\n        options.allowInvalidSurrogate().quoteSingle().prettyPrinting().build());\n\n// Using configuration object\nJson5Options options = new Json5Options(true, true, true, 2);\nJson5 json5 = new Json5(options);\n```\n\n### Parsing \n```java\nJson5 json5 = ...\n\n// Parse from a String literal\nJson5Element element = \n        json5.parse(\"{ 'key': 'value', 'array': ['first val','second val'] }\");\n\n// ...\n\n// Parse from a Reader or InputStream\ntry(InputStream stream = ...) {\n    Json5Element element = json5.parse(stream);\n    // ...\n} catch (IOException e) {\n    // ...\n}\n```\n\n### Serialization\n```java\nJson5Element element = ...\n\n// Serialize to a String literal\nString jsonString = json5.serialize(element);\n\n// ...\n\n// Serialize to a Writer or OutputStream        \ntry(OutputStream stream = ...) {\n    json5.serialize(element, stream);\n    // ...\n} catch (IOException e) {\n    // ...\n}\n```\n\n## Documentation\nDetailed javadoc documentation can be found at [javadoc.io](https://javadoc.io/doc/de.marhali/json5-java).\n\n### Parsing \u0026 Serialization Options\nThis library supports a few customizations to adjust the behaviour of parsing and serialization.\nFor a detailed explanation see the [Json5Options](src/main/java/de/marhali/json5/Json5Options.java) class.\n\n- allowInvalidSurrogates\n- quoteSingle\n- trailingComma\n- indentFactor\n\n## License\nThis library is released under the [Apache 2.0 license](LICENSE).\n\nPartial parts of the project are based on [GSON](https://github.com/google/gson) and [Synt4xErr0r4 / json5](https://github.com/Synt4xErr0r4/json5). The affected classes contain the respective license notice. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarhali%2Fjson5-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarhali%2Fjson5-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarhali%2Fjson5-java/lists"}