Skip to content

Commit 23127ca

Browse files
committed
Merge remote-tracking branch 'remotes/origin/master' into addSerializerExtensions
# Conflicts: # src/main/kotlin/com/fasterxml/jackson/module/kotlin/Extensions.kt
2 parents cebd206 + 41d35ab commit 23127ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2887
-179
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
language: java
22

3-
# No more JDK 7 builds
43
jdk:
54
- openjdk8
5+
- openjdk11
66

77
# whitelist
88
branches:
99
only:
1010
- master
11-
- "2.10"
11+
- "3.0"

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22

33
# Overview
44

5-
Module that adds support for serialization/deserialization of [Kotlin](http://kotlinlang.org) classes and data classes. Previously a default constructor must have existed on the Kotlin object for Jackson to deserialize into the object. With this module, single constructor classes can be used automatically, and those with secondary constructors or static factories are also supported.
5+
Module that adds support for serialization/deserialization of [Kotlin](http://kotlinlang.org) classes and data classes.
6+
Previously a default constructor must have existed on the Kotlin object for Jackson to deserialize into the object.
7+
With this module, single constructor classes can be used automatically, and those with secondary constructors or static factories are also supported.
68

79
# Status
810

911
[![Build Status](https://travis-ci.org/FasterXML/jackson-module-kotlin.svg)](https://travis-ci.org/FasterXML/jackson-module-kotlin)
1012

1113
2.9.8+ Releases are compiled with Kotlin 1.3.x, other older releases are Kotlin 1.2.x. All should be compatible with
12-
current Kotlin if you also ensure the `kotlin-reflect` depedency is included with the same version number as stdlib.
14+
current Kotlin if you also ensure the `kotlin-reflect` dependency is included with the same version number as stdlib.
1315

14-
* release `2.10.10` (for Jackson `2.10.x`)
16+
* release `2.10.2` (for Jackson `2.10.x`)
1517
* release `2.9.10` (for Jackson `2.9.x`)
1618
* release `2.8.11.1` (for Jackson `2.8.x`)
1719
* release `2.7.9.1` (for Jackson `2.7.x`) lacking in some new features from 2.8 branch
@@ -28,7 +30,7 @@ Maven:
2830
<dependency>
2931
<groupId>com.fasterxml.jackson.module</groupId>
3032
<artifactId>jackson-module-kotlin</artifactId>
31-
<version>2.10.10</version>
33+
<version>2.10.2</version>
3234
</dependency>
3335
```
3436

@@ -73,7 +75,9 @@ Therefore using `readValue()` extension without the `Class` parameter will reify
7375

7476
# Annotations
7577

76-
You can intermix non-field values in the constructor and `JsonProperty` annotation in the constructor. Any fields not present in the constructor will be set after the constructor call. An example of these concepts:
78+
You can intermix non-field values in the constructor and `JsonProperty` annotation in the constructor.
79+
Any fields not present in the constructor will be set after the constructor call.
80+
An example of these concepts:
7781

7882
```kotlin
7983
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@@ -84,13 +88,15 @@ You can intermix non-field values in the constructor and `JsonProperty` annotati
8488
}
8589
```
8690

87-
Note that using `lateinit` or `Delegates.notNull()` will ensure that the value is never null when read, while letting it be instantiated after the construction of the class.
91+
Note that using `lateinit` or `Delegates.notNull()` will ensure that the value is never `null` when read, while letting it be instantiated after the construction of the class.
8892

8993
# Caveats
9094

91-
* The `@JsonCreator` annotation is optional unless you have more than one constructor that is valid, or you want to use a static factory method (which also must have `platformStatic` annotation). In these cases, annotate only one method as `JsonCreator`.
95+
* The `@JsonCreator` annotation is optional unless you have more than one constructor that is valid, or you want to use a static factory method (which also must have `platformStatic` annotation). In these cases, annotate only one method as `JsonCreator`.
9296
* Serializing a member or top-level Kotlin class that implements Iterator requires a workaround, see [Issue #4](https://github.com/FasterXML/jackson-module-kotlin/issues/4) for easy workarounds.
93-
* If using proguard, `kotlin.Metadata` annotations may be stripped, preventing deserialization. Add a proguard rule to keep the `kotlin.Metadata` class: `-keep class kotlin.Metadata { *; }`
97+
* If using proguard:
98+
* `kotlin.Metadata` annotations may be stripped, preventing deserialization. Add a proguard rule to keep the `kotlin.Metadata` class: `-keep class kotlin.Metadata { *; }`
99+
* If you're getting `java.lang.ExceptionInInitializerError`, you may also need: `-keep class kotlin.reflect.** { *; }`
94100

95101
# Support for Kotlin Built-in classes
96102

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2+
<!-- NewPage -->
3+
<html lang="en">
4+
<head>
5+
<!-- Generated by javadoc (1.8.0_162) on Sat Apr 25 20:31:52 PDT 2020 -->
6+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7+
<title>All Classes (jackson-module-kotlin 2.11.0 API)</title>
8+
<meta name="date" content="2020-04-25">
9+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
10+
<script type="text/javascript" src="script.js"></script>
11+
</head>
12+
<body>
13+
<h1 class="bar">All&nbsp;Classes</h1>
14+
<div class="indexContainer">
15+
<ul>
16+
<li><a href="com/fasterxml/jackson/module/kotlin/PackageVersion.html" title="class in com.fasterxml.jackson.module.kotlin" target="classFrame">PackageVersion</a></li>
17+
</ul>
18+
</div>
19+
</body>
20+
</html>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2+
<!-- NewPage -->
3+
<html lang="en">
4+
<head>
5+
<!-- Generated by javadoc (1.8.0_162) on Sat Apr 25 20:31:52 PDT 2020 -->
6+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7+
<title>All Classes (jackson-module-kotlin 2.11.0 API)</title>
8+
<meta name="date" content="2020-04-25">
9+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
10+
<script type="text/javascript" src="script.js"></script>
11+
</head>
12+
<body>
13+
<h1 class="bar">All&nbsp;Classes</h1>
14+
<div class="indexContainer">
15+
<ul>
16+
<li><a href="com/fasterxml/jackson/module/kotlin/PackageVersion.html" title="class in com.fasterxml.jackson.module.kotlin">PackageVersion</a></li>
17+
</ul>
18+
</div>
19+
</body>
20+
</html>

0 commit comments

Comments
 (0)