java jackson 性能_Jackson: Jackson 是一个 Java 的用来处理 JSON 格式数据的类库,性能非常好...

Overview

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 can be found from

Jackson-1 github repo.

jackson-core.svg?branch=master

badge.svg

jackson-core.svg

badge.svg?branch=master

Get it!

Maven

Functionality of this package is contained in

Java package com.fasterxml.jackson.core.

To use the package, you need to use following Maven dependency:

com.fasterxml.jackson.core

jackson-core

${jackson.version.core}

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).

Non-Maven

For non-Maven use cases, you download jars from Central Maven repository.

Core jar is also a functional OSGi bundle, with proper import/export declarations, so it can be use on OSGi container as is.

Use it!

General

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();

More information can be found from Streaming API.

Usage, simple reading

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.

Usage, simple writing

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:

Further reading

Differences from Jackson 1.x

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:

Maven build instead of Ant

Annotations carved out to a separate package (that this package depends on)

Java package is now com.fasterxml.jackson.core (instead of org.codehaus.jackson)

Links

Project Wiki has JavaDocs and links to downloadable artifacts

Jackson Github Hub has links to all official Jackson components

Jackson Github Doc is the hub for official Jackson documentation

FasterXML Jackson Project Wiki has additional documentation (especially for older Jackson versions)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值