<commit_before># Overview

This project contains general purpose annotations for
Jackson Data Processor, used on value and handler types.
The only annotations not included are ones that require dependency
to the [Databind package](/FasterXML/jackson-databind).

Project contains versions 2.0 and above: source code for earlier (1.x) versions is available from [Codehaus](http://jackson.codehaus.org) SVN repository.
Note that with version 1.x these annotations were part of the 'core jar'.

[Full Listing of Jackson Annotations](../../wiki/Jackson-Annotations) details all available annotations;
[Project Wiki](../../wiki) gives more details.

Project is licensed under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).


[![Build Status](https://travis-ci.org/FasterXML/jackson-annotations.png?branch=master)](https://travis-ci.org/FasterXML/jackson-annotations)

-----

## Usage, general

### Improvements over typical Java annotations

In addition to regular usage (see below), there are couple of noteworthy improvements Jackson does:

* [Mix-in annotations](../../wiki/Mixin-Annotations) allow associating annotations on third-party classes ''without modifying classes''.
* Jackson annotations support full inheritance: meaning that you can ''override annotation definitions'', and not just class annotations but also method/field annotations!

### Maven, Java package

All annotations are in Java package `com.fasterxml.jackson.annotation`.
To use annotations, you need to use Maven dependency:

```xml
<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-annotations</artifactId>
  <version>2.4.0</version>
</dependency>
```

or download jars from Maven repository (or via quick links on [Wiki](../../wiki)

## Usage, simple

Let's start with simple use cases: renaming or ignoring properties, and modifying types that are used.

Note: while examples only show field properties, same annotations would work with method (getter/setter) properties.

### Annotations for renaming properties

One of most common tasks is to change JSON name used for a property: for example:

```java
public class Name {<commit_msg>Use Maven Central badge to show latest release version.<commit_after># Overview

This project contains general purpose annotations for
Jackson Data Processor, used on value and handler types.
The only annotations not included are ones that require dependency
to the [Databind package](/FasterXML/jackson-databind).

Project contains versions 2.0 and above: source code for earlier (1.x) versions is available from [Codehaus](http://jackson.codehaus.org) SVN repository.
Note that with version 1.x these annotations were part of the 'core jar'.

[Full Listing of Jackson Annotations](../../wiki/Jackson-Annotations) details all available annotations;
[Project Wiki](../../wiki) gives more details.

Project is licensed under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).


[![Build Status](https://travis-ci.org/FasterXML/jackson-annotations.png?branch=master)](https://travis-ci.org/FasterXML/jackson-annotations) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.fasterxml.jackson.core/jackson-annotations/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.fasterxml.jackson.core/jackson-annotations)

-----

## Usage, general

### Improvements over typical Java annotations

In addition to regular usage (see below), there are couple of noteworthy improvements Jackson does:

* [Mix-in annotations](../../wiki/Mixin-Annotations) allow associating annotations on third-party classes ''without modifying classes''.
* Jackson annotations support full inheritance: meaning that you can ''override annotation definitions'', and not just class annotations but also method/field annotations!

### Maven, Java package

All annotations are in Java package `com.fasterxml.jackson.annotation`.
To use annotations, you need to use Maven dependency:

```xml
<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-annotations</artifactId>
  <version>${jackson-annotations-version}</version>
</dependency>
```

or download jars from Maven repository (or via quick links on [Wiki](../../wiki)

## Usage, simple

Let's start with simple use cases: renaming or ignoring properties, and modifying types that are used.

Note: while examples only show field properties, same annotations would work with method (getter/setter) properties.

### Annotations for renaming properties

One of most common tasks is to change JSON name used for a property: for example:

```java
public class Name {
{'fraction_non_alphanumeric': 0.1050238198354266, 'fraction_numerical': 0.00411433521004764, 'mean_word_length': 5.014322916666667, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1578543', 'n_tokens_mistral': 1293, 'n_tokens_neox': 1163, 'n_words': 478}