Skip to content

Commit 7701c4c

Browse files
v2.5
1 parent 19f7ac4 commit 7701c4c

File tree

10 files changed

+244
-129
lines changed

10 files changed

+244
-129
lines changed

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/ru.oleg-cherednik.utils/jackson-utils/badge.svg)](https://maven-badges.herokuapp.com/maven-central/ru.oleg-cherednik.jackson/jackson-utils)
2-
[![javadoc](https://javadoc.io/badge2/ru.oleg-cherednik.utils/jackson-utils/javadoc.svg)](https://javadoc.io/doc/ru.oleg-cherednik.jackson/jackson-utils)
1+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/ru.oleg-cherednik.jackson/jackson-utils/badge.svg)](https://maven-badges.herokuapp.com/maven-central/ru.oleg-cherednik.jackson/jackson-utils)
2+
[![javadoc](https://javadoc.io/badge2/ru.oleg-cherednik.jackson/jackson-utils/javadoc.svg)](https://javadoc.io/doc/ru.oleg-cherednik.jackson/jackson-utils)
33
[![java1.8](https://badgen.net/badge/java/1.8/blue)](https://badgen.net/)
44
[![circle-ci](https://circleci.com/gh/oleg-cherednik/jackson-utils/tree/dev.svg?style=svg)](https://circleci.com/gh/oleg-cherednik/jackson-utils/tree/dev)
55
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.txt)
66
[![quality](https://app.codacy.com/project/badge/Grade/a2abf7ff8b1b4e82ad2cd0d039aea353)](https://www.codacy.com/gh/oleg-cherednik/jackson-utils/dashboard?utm_source=github.com&utm_medium=referral&utm_content=oleg-cherednik/jackson-utils&utm_campaign=Badge_Grade)
77
[![coverage](https://app.codacy.com/project/badge/Coverage/a2abf7ff8b1b4e82ad2cd0d039aea353)](https://www.codacy.com/gh/oleg-cherednik/jackson-utils/dashboard?utm_source=github.com&utm_medium=referral&utm_content=oleg-cherednik/jackson-utils&utm_campaign=Badge_Coverage)
8-
[![Known Vulnerabilities](https://snyk.io//test/github/oleg-cherednik/JacksonUtils/badge.svg?targetFile=build.gradle)](https://snyk.io//test/github/oleg-cherednik/JacksonUtils?targetFile=build.gradle)
9-
8+
[![vulnerabilities](https://snyk.io//test/github/oleg-cherednik/JacksonUtils/badge.svg?targetFile=build.gradle)](https://snyk.io//test/github/oleg-cherednik/JacksonUtils?targetFile=build.gradle)
9+
[![license-scan](https://app.fossa.com/api/projects/git%2Bgithub.com%2Foleg-cherednik%2Fjackson-utils.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Foleg-cherednik%2Fjackson-utils?ref=badge_shield)
10+
1011
# jackson-utils
1112
> [Jackson Project](https://github.com/FasterXML/jackson) usability utilities.
1213
> It's designed to add additional features like easy and centralized configuration,
@@ -22,12 +23,12 @@
2223
* `ByteBuffer`/`InputStream` support for objects, lists and maps;
2324
* Lazy read support for list from `Writer`;
2425
* Read numeric as `Integer`, `Long`, `BigInteger` or `Double` (but not only as `Double`);
25-
* Advanced `Reader`/`Writer` support for `enum`.
26+
* Advanced `Reader`/`Writer` support for `enum`.
2627

2728
## Gradle
2829

2930
```groovy
30-
compile 'ru.oleg-cherednik.jackson:jackson-utils:2.4'
31+
compile 'ru.oleg-cherednik.jackson:jackson-utils:2.5'
3132
```
3233

3334
## Maven
@@ -36,14 +37,14 @@ compile 'ru.oleg-cherednik.jackson:jackson-utils:2.4'
3637
<dependency>
3738
<groupId>ru.oleg-cherednik.jackson</groupId>
3839
<artifactId>jackson-utils</artifactId>
39-
<version>2.4</version>
40+
<version>2.5</version>
4041
</dependency>
41-
```
42+
```
4243

4344
**Note:** `jackson-utils` does not contain dependency to the specific `Jackson Project`
4445
version, so you have to add it additionally:
4546

46-
## Usage
47+
## Usage
4748

4849
To simplify usage of _jackson-utils_, there're following classes:
4950
* [JacksonUtils](#jacksonutils-class) - utility class with set of methods to use json transformation;
@@ -174,13 +175,13 @@ class Data {
174175
String strVal;
175176
}
176177
```
177-
```json
178+
```json
178179
{
179180
"intVal" : 666,
180181
"strVal" : "omen"
181182
}
182183
```
183-
```java
184+
```java
184185
try (InputStream in = ...) {
185186
Data data = JacksonUtils.readValue(in, Data.class);
186187
}
@@ -195,7 +196,7 @@ class Data {
195196
String strVal;
196197
}
197198
```
198-
```json
199+
```json
199200
[
200201
{
201202
"intVal" : 555,
@@ -221,7 +222,7 @@ class Data {
221222
String strVal;
222223
}
223224
```
224-
```json
225+
```json
225226
[
226227
{
227228
"intVal" : 555,
@@ -236,7 +237,7 @@ class Data {
236237
```java
237238
try (InputStream in = ...) {
238239
Iterator<Data> it = JacksonUtils.readListLazy(in, Data.class);
239-
240+
240241
while (it.hasNext()) {
241242
Data data = it.next();
242243
}
@@ -246,7 +247,7 @@ try (InputStream in = ...) {
246247

247248
###### `InputStream` to a map with `String` keys and `Map` or primitive types as values
248249

249-
```json
250+
```json
250251
{
251252
"victory" : {
252253
"intVal" : 555,
@@ -273,7 +274,7 @@ class Data {
273274
String strVal;
274275
}
275276
```
276-
```json
277+
```json
277278
{
278279
"victory" : {
279280
"intVal" : 555,
@@ -299,7 +300,7 @@ class Data {
299300
String strVal;
300301
}
301302
```
302-
```json
303+
```json
303304
{
304305
"1" : {
305306
"intVal" : 555,

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repositories {
2121
}
2222

2323
group 'ru.oleg-cherednik.jackson'
24-
version '2.4'
24+
version '2.5'
2525

2626
sourceCompatibility = '1.8'
2727
targetCompatibility = '1.8'
@@ -49,13 +49,13 @@ dependencies {
4949

5050
testImplementation "com.fasterxml.jackson.core:jackson-databind:${property('jackson.version')}"
5151
testImplementation "com.fasterxml.jackson.module:jackson-module-afterburner:${property('jackson.version')}"
52-
testImplementation "com.fasterxml.jackson.module:jackson-module-parameter-names:${property('jackson.version')}"
52+
testImplementation "com.fasterxml.jackson.module:jackson-module-parameter-names:2.13.2"
5353
testImplementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${property('jackson.version')}"
5454
testImplementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${property('jackson.version')}"
5555

5656
testImplementation 'org.assertj:assertj-core:3.22.0'
5757
testImplementation 'commons-io:commons-io:2.11.0'
58-
testImplementation 'org.mockito:mockito-core:4.3.1'
58+
testImplementation 'org.mockito:mockito-core:4.5.1'
5959

6060
testImplementation("org.springframework.boot:spring-boot-starter-web:${property('spring-boot.version')}") {
6161
exclude group: 'org.junit.jupiter'

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
jackson.version=2.13.1
1+
jackson.version=2.13.2
22
reflection-utils.version=1.0
3-
spring-boot.version=2.6.4
3+
spring-boot.version=2.6.7

gradle/wrapper/gradle-wrapper.jar

618 Bytes
Binary file not shown.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Tue Jan 05 12:46:17 MSK 2021
2-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
31
distributionBase=GRADLE_USER_HOME
42
distributionPath=wrapper/dists
5-
zipStorePath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
64
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)