{"id":13713438,"url":"https://github.com/FasterXML/jackson-core","last_synced_at":"2025-05-06T23:32:02.511Z","repository":{"id":2097144,"uuid":"3037907","full_name":"FasterXML/jackson-core","owner":"FasterXML","description":"Core part of Jackson that defines Streaming API as well as basic shared abstractions","archived":false,"fork":false,"pushed_at":"2025-04-29T03:46:08.000Z","size":27189,"stargazers_count":2301,"open_issues_count":44,"forks_count":812,"subscribers_count":158,"default_branch":"2.x","last_synced_at":"2025-05-01T10:12:23.952Z","etag":null,"topics":["hacktoberfest","jackson","json"],"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/FasterXML.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"tidelift":"maven/com.fasterxml.jackson.core:jackson-core","github":"cowtowncoder"}},"created_at":"2011-12-23T02:00:51.000Z","updated_at":"2025-04-29T03:46:12.000Z","dependencies_parsed_at":"2024-06-17T23:48:24.466Z","dependency_job_id":"209d6114-7717-4d02-b775-c5d00ffba083","html_url":"https://github.com/FasterXML/jackson-core","commit_stats":{"total_commits":2641,"total_committers":103,"mean_commits":"25.640776699029125","dds":0.1548655812192351,"last_synced_commit":"92deb28f73eeaa522b72ca2cb86749aa8d9e0253"},"previous_names":[],"tags_count":162,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FasterXML%2Fjackson-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FasterXML%2Fjackson-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FasterXML%2Fjackson-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FasterXML%2Fjackson-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FasterXML","download_url":"https://codeload.github.com/FasterXML/jackson-core/tar.gz/refs/heads/2.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251857022,"owners_count":21655121,"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":["hacktoberfest","jackson","json"],"created_at":"2024-08-02T23:01:36.257Z","updated_at":"2025-05-06T23:32:02.499Z","avatar_url":"https://github.com/FasterXML.png","language":"Java","readme":"# Overview\n\nThis project contains core low-level incremental (\"streaming\") parser and generator abstractions used by\n[Jackson Data Processor](https://github.com/FasterXML/jackson).\nIt also includes the default implementation of handler types (parser, generator) that handle JSON format.\nThe core abstractions are not JSON specific, although naming does contain 'JSON' in many places, due to historical reasons. Only packages that specifically contain word 'json' are JSON-specific.\n\nThis package is the base on which [Jackson data-binding](https://github.com/FasterXML/jackson-databind) package builds on.\nIt is licensed under [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).\n\nAlternate data format implementations (like\n[Smile (binary JSON)](https://github.com/FasterXML/jackson-dataformats-binary/tree/2.19/smile),\n[XML](https://github.com/FasterXML/jackson-dataformat-xml),\n[CSV](https://github.com/FasterXML/jackson-dataformats-text/tree/2.19/csv),\n[YAML](https://github.com/FasterXML/jackson-dataformats-text/tree/2.19/yaml),\n[Protobuf](https://github.com/FasterXML/jackson-dataformats-binary/tree/2.19/protobuf),\nand [CBOR](https://github.com/FasterXML/jackson-dataformats-binary/tree/2.19/cbor))\nalso build on this base package, implementing the core interfaces,\nmaking it possible to use standard [data-binding package](https://github.com/FasterXML/jackson-databind) regardless of underlying data format.\n\nProject contains versions 2.0 and above: source code for earlier (1.x) versions can be found from\n[Jackson-1](../../../jackson-1) github repo.\n\n## Status\n\n| Type | Status |\n| ---- | ------ |\n| Build (CI) | [![Build (github)](https://github.com/FasterXML/jackson-core/actions/workflows/main.yml/badge.svg)](https://github.com/FasterXML/jackson-core/actions/workflows/main.yml) |\n| Artifact | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.fasterxml.jackson.core/jackson-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.fasterxml.jackson.core/jackson-core) |\n| OSS Sponsorship | [![Tidelift](https://tidelift.com/badges/package/maven/com.fasterxml.jackson.core:jackson-core)](https://tidelift.com/subscription/pkg/maven-com-fasterxml-jackson-core-jackson-core?utm_source=maven-com-fasterxml-jackson-core-jackson-core\u0026utm_medium=referral\u0026utm_campaign=readme) |\n| Javadocs | [![Javadoc](https://javadoc.io/badge/com.fasterxml.jackson.core/jackson-core.svg)](https://javadoc.io/doc/com.fasterxml.jackson.core/jackson-core) |\n| Code coverage (2.18) | [![codecov.io](https://codecov.io/github/FasterXML/jackson-core/coverage.svg?branch=2.18)](https://codecov.io/github/FasterXML/jackson-core?branch=2.18) |\n| CodeQ (ClusterFuzz) | [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/jackson-core.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened\u0026can=1\u0026q=proj:jackson-core) |\n| OpenSSF Score | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/FasterXML/jackson-core/badge)](https://securityscorecards.dev/viewer/?uri=github.com/FasterXML/jackson-core) |\n\n# Get it!\n\n## Maven\n\nFunctionality of this package is contained in \nJava package `com.fasterxml.jackson.core`.\n\nTo use the package, you need to use following Maven dependency:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.fasterxml.jackson.core\u003c/groupId\u003e\n    \u003cartifactId\u003ejackson-core\u003c/artifactId\u003e\n    \u003cversion\u003e${jackson.version.core}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nor download jars from Maven repository or links on [Wiki](../../wiki).\nCore jar is a functional OSGi bundle, with proper import/export declarations.\n\nPackage has no external dependencies, except for testing (which uses `JUnit`).\n\n## Non-Maven\n\nFor non-Maven use cases, you download jars from [Central Maven repository](https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/).\n\nCore jar is also a functional OSGi bundle, with proper import/export declarations, so it can be use on OSGi container as is.\n\nJackson 2.10 and above include `module-info.class` definitions so the jar is also a proper Java module (JPMS).\n\nJackson 2.12 and above include additional Gradle 6 Module Metadata for version alignment with Gradle.\n\n-----\n# Use it!\n\n## General\n\nUsage typically starts with creation of a reusable (and thread-safe, once configured) `JsonFactory` instance:\n\n```java\n// Builder-style since 2.10:\nJsonFactory factory = JsonFactory.builder()\n// configure, if necessary:\n     .enable(JsonReadFeature.ALLOW_JAVA_COMMENTS)\n     .build();\n\n// older 2.x mechanism, still supported for 2.x\nJsonFactory factory = new JsonFactory();\n// configure, if necessary:\nfactory.enable(JsonReadFeature.ALLOW_JAVA_COMMENTS);\n```\n\nAlternatively, you have an `ObjectMapper` (from [Jackson Databind package](https://github.com/FasterXML/jackson-databind)) handy; if so, you can do:\n\n```java\nJsonFactory factory = objectMapper.getFactory();\n```\n\n## Usage, simple reading\n\nAll reading is by using `JsonParser` (or its sub-classes, in case of data formats other than JSON),\ninstance of which is constructed by `JsonFactory`.\n\nAn example can be found from [Reading and Writing Event Streams](http://www.cowtowncoder.com/blog/archives/2009/01/entry_132.html)\n\n## Usage, simple writing\n\nAll writing is by using `JsonGenerator` (or its sub-classes, in case of data formats other than JSON),\ninstance of which is constructed by `JsonFactory`:\n\nAn example can be found from [Reading and Writing Event Streams](http://www.cowtowncoder.com/blog/archives/2009/01/entry_132.html)\n\n## Processing limits\n\nStarting with [Jackson 2.15](https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.15), Jackson has configurable limits for some aspects of input decoding and output generation.\n\nImplemented limits are:\n\n* Length are expressed in input/output units -- `byte`s or `char`s -- depending on input source\n* Defined as longest allowed length, but not necessarily imposed at 100% accuracy: that is, if maximum allowed length is specified as 1000 units, something with length of, say 1003 may not cause exception (but 1500 would typically do)\n* Defined using new `StreamReadConstraints` / `StreamWriteConstraints` classes, configurable on per-`JsonFactory` basis\n* Main focus is to reduce likelihood of excessive memory usage/retention and/or processing costs; not validation\n\n### Input parsing limits\n\n* Maximum Number token length (2.15+): (see https://github.com/FasterXML/jackson-core/issues/815)\n    * Default: Maximum 1000 for both integral and floating-point numbers.\n* Maximum String value length (2.15+): (see https://github.com/FasterXML/jackson-core/issues/863)\n    * Default: 20_000_000 (20 million) (since 2.15.1; 2.15.0 had lower limit, 5 million)\n* Maximum Input nesting depth (2.15+): (see https://github.com/FasterXML/jackson-core/pull/943)\n    * Default: 1000 levels\n* Maximum Property name length (2.16+): (see https://github.com/FasterXML/jackson-core/issues/1047)\n    * Default: 50,000\n* Maximum Document length (2.16+): (see https://github.com/FasterXML/jackson-core/issues/1046)\n    * Default: Unlimited (-1)\n\n### Output generation limits\n\n* Maximum Output nesting depth (2.16+): (see https://github.com/FasterXML/jackson-core/pull/1055)\n    * Default: 1000 levels\n\n### Re-configuring limits\n\nYou can change per-factory limits as follows:\n\n```java\nJsonFactory f = JsonFactory.builder()\n  .streamReadConstraints(StreamReadConstraints.builder().maxDocumentLength(10_000_000L).build())\n  .streamReadConstraints(StreamReadConstraints.builder().maxNumberLength(250).build())\n  .streamWriteConstraints(StreamWriteConstraints.builder().maxNestingDepth(2000).build())\n  .build();\n```\n\n## Error Report Configuration\n\nStarting with [Jackson 2.16](https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.16), Jackson offers configurable\nbehavior around error-reporting.\n\nCurrently supported configuration options are:\n\n- `maxErrorTokenLength` : Maximum length of token to include in error messages (2.16+): (see [#1066](https://github.com/FasterXML/jackson-core/issues/1066))\n- `maxRawContentLength` : Maximum length of raw content to include in error messages (2.16+): (see [#1066](https://github.com/FasterXML/jackson-core/issues/1066))\n\n... see [Example](#example) section below.\n\n### Example\n\n```java\nJsonFactory f = JsonFactory.builder()\n .errorReportConfiguration(ErrorReportConfiguration.builder()\n   .maxErrorTokenLength(1004)\n   .maxRawContentLength(2008)\n   .build()\n ).build();\n```\n\n-----\n\n## Compatibility\n\n### JDK\n\nJackson-core package baseline JDK requirement:\n\n* Versions 2.0 - 2.13 require JDK 6\n* Versions 2.14 and above require JDK 8\n\n### Android\n\nList is incomplete due to recent addition of compatibility checker.\n\n* 2.13: Android SDK 19+\n* 2.14 and above: Android SDK 26+\n\nfor information on Android SDK versions to Android Release names see [Android version history](https://en.wikipedia.org/wiki/Android_version_history)\n\n-----\n\n## Release Process\n\nStarting with Jackson 2.15, releases of this module will be [SLSA](https://slsa.dev/) compliant: see issue #844 for details.\n\nRelease process is triggered by\n\n    ./release.sh\n\nscript which uses Maven Release plug-in under the hood (earlier release plug-in was directly invoked).\n\n-----\n\n## Support\n\n### Community support\n\nJackson components are supported by the Jackson community through mailing lists, Gitter forum, Github issues. See [Participation, Contributing](../../../jackson#participation-contributing) for full details.\n\n### Enterprise support\n\nAvailable as part of the [Tidelift](https://tidelift.com/subscription/pkg/maven-com-fasterxml-jackson-core-jackson-databind) Subscription.\n\nThe maintainers of `jackson-core` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/maven-com-fasterxml-jackson-core-jackson-core?utm_source=maven-com-fasterxml-jackson-core-jackson-core\u0026utm_medium=referral\u0026utm_campaign=enterprise\u0026utm_term=repo)\n\n-----\n\n# Further reading\n\n## Differences from Jackson 1.x\n\nProject contains versions 2.0 and above: source code for the latest 1.x version (1.9.13) is available from\n[FasterXML/jackson-1](https://github.com/FasterXML/jackson-1) repo (unmaintained).\n\nNote that the main differences compared to 1.0 core jar are:\n\n* Maven build instead of Ant\n* Annotations carved out to a separate package (that this package depends on)\n* Java package is now `com.fasterxml.jackson.core` (instead of `org.codehaus.jackson`)\n\n## Links\n\n* Project  [Wiki](../../wiki) has JavaDocs and links to downloadable artifacts\n* [Jackson (portal)](https://github.com/FasterXML/jackson) has links to all FasterXML-maintained \"official\" Jackson components\n* [Jackson Docs](https://github.com/FasterXML/jackson-docs) is the portal/hub for all kinds of Jackson documentation\n","funding_links":["https://tidelift.com/funding/github/maven/com.fasterxml.jackson.core:jackson-core","https://github.com/sponsors/cowtowncoder","https://tidelift.com/badges/package/maven/com.fasterxml.jackson.core:jackson-core","https://tidelift.com/subscription/pkg/maven-com-fasterxml-jackson-core-jackson-core?utm_source=maven-com-fasterxml-jackson-core-jackson-core\u0026utm_medium=referral\u0026utm_campaign=readme","https://tidelift.com/subscription/pkg/maven-com-fasterxml-jackson-core-jackson-databind","https://tidelift.com/subscription/pkg/maven-com-fasterxml-jackson-core-jackson-core?utm_source=maven-com-fasterxml-jackson-core-jackson-core\u0026utm_medium=referral\u0026utm_campaign=enterprise\u0026utm_term=repo"],"categories":["Index","Data Format \u0026 I/O"],"sub_categories":["JSON","For Java"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFasterXML%2Fjackson-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFasterXML%2Fjackson-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFasterXML%2Fjackson-core/lists"}