tag | 868826dca59b0206e01d19fe19523457822d00a5 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Jul 05 17:16:50 2023 -0700 |
object | e431391a0fcef80c187060e7a9bc0600622af91b |
Android platform 12.1.0 release 17
commit | e431391a0fcef80c187060e7a9bc0600622af91b | [log] [tgz] |
---|---|---|
author | android-build-team Robot <android-build-team-robot@google.com> | Sun Mar 28 23:03:05 2021 +0000 |
committer | android-build-team Robot <android-build-team-robot@google.com> | Sun Mar 28 23:03:05 2021 +0000 |
tree | 2ea976e35ebc7c2f0a054ecb11b07aa9680a7617 | |
parent | 0858ba265921822ee31ccd9e062d777e5ce3c15e [diff] | |
parent | 5f2abc52cbb015466c3fa5b329bb8a814841c73d [diff] |
Snap for 7240964 from 5f2abc52cbb015466c3fa5b329bb8a814841c73d to sc-v2-release Change-Id: I04b25e0e915c4e771a599b0fd2aa7755a3b5660e
This project contains core low-level incremental ("streaming") parser and generator abstractions used by Jackson Data Processor. It also includes the default implementation of handler types (parser, generator) that handle JSON format. The 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.
This package is the base on which Jackson data-binding package builds on. It is licensed under Apache License 2.0. For additional/alternative licensing questions, please contact info@fasterxml.com
: affordable commercial licenses available for use cases like Android app development.
Alternate data format implementations (like Smile (binary JSON), XML, CSV) and CBOR also build on this base package, implementing the core interfaces, making it possible to use standard data-binding package regardless of underlying data format.
Project contains versions 2.0 and above: source code for earlier (1.x) versions is available from Codehaus SVN repository.
Functionality of this package is contained in Java package com.fasterxml.jackson.core
.
To use the package, you need to use following Maven dependency:
<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>${jackson-core-version}</version> </dependency>
or download jars from Maven repository or links on Wiki. Core jar is a functional OSGi bundle, with proper import/export declarations.
Package has no external dependencies, except for testing (which uses JUnit
).
For non-Maven use cases, you download jars from Central Maven repository or Wiki.
Core jar is also a functional OSGi bundle, with proper import/export declarations, so it can be use on OSGi container as is.
Usage typically starts with creation of a reusable (and thread-safe, once configured) JsonFactory
instance:
JsonFactory factory = new JsonFactory(); // configure, if necessary: factory.enable(JsonParser.Feature.ALLOW_COMMENTS);
Alternatively, you have a ObjectMapper
(from Jackson Databind package) handy; if so, you can do:
JsonFactory factory = objectMapper.getFactory();
All reading is by using JsonParser
(or its sub-classes, in case of data formats other than JSON), instance of which is constructed by JsonFactory
.
An example can be found from Reading and Writing Event Streams
All writing is by using JsonGenerator
(or its sub-classes, in case of data formats other than JSON), instance of which is constructed by JsonFactory
:
An example can be found from Reading and Writing Event Streams
Project contains versions 2.0 and above: source code for earlier (1.x) versions is available from Codehaus SVN repository
Note that the main differences compared to 1.0 core jar are:
com.fasterxml.jackson.core
(instead of org.codehaus.jackson
)