You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -137,7 +137,7 @@ The callback `updateBinding` change the data source or decoder for a field. The
137
137
138
138
The input is a concept called `Binding`, which not only represent field, but also constructor parameter and setter parameter. It contains the necessary information about what is binding, and you can customize how to bind it:
139
139
140
-
```
140
+
```java
141
141
publicclassBinding {
142
142
// input
143
143
publicClass clazz;
@@ -187,7 +187,7 @@ public class MyAnnotationSupport extends EmptyExtension {
187
187
188
188
Then you can annotate
189
189
190
-
```
190
+
```java
191
191
publicstaticclassAnnotatedObject {
192
192
@JsonProperty("field-1")
193
193
publicint field1;
@@ -229,7 +229,7 @@ public class CustomizedConstructor {
229
229
230
230
Using this extension point, `@JsonCreator` annotation support has been implemented. You can mark it on constructor:
231
231
232
-
```
232
+
```java
233
233
publicstaticclassNoDefaultCtor {
234
234
privateint field1;
235
235
@@ -242,7 +242,7 @@ public static class NoDefaultCtor {
242
242
243
243
Or, you can mark it on static method:
244
244
245
-
```
245
+
```java
246
246
publicstaticclassStaticFactory {
247
247
248
248
privateint field1;
@@ -273,7 +273,7 @@ The binding is done in this sequence
273
273
274
274
By default, methods like `setName(val)` will be caleld with field value from `name`. You can choose to use other kinds of methods as setters. For example
275
275
276
-
```
276
+
```java
277
277
publicstaticclassWithSetter {
278
278
279
279
privateint field1;
@@ -289,7 +289,7 @@ public static class WithSetter {
289
289
290
290
This annotation support is implemented by `Extension` as well. The callback is:
291
291
292
-
```
292
+
```java
293
293
publicinterfaceExtension {
294
294
// ...
295
295
List<CustomizedSetter>getSetters(Classclazz);
@@ -313,7 +313,7 @@ The setter parameters, constructor parameters and fields are all just bindings.
313
313
314
314
# Extension & Iterator
315
315
316
-
```
316
+
```java
317
317
publicinterfaceExtension {
318
318
/**
319
319
* Customize type decoding
@@ -361,7 +361,7 @@ Also the decoder interface is powered with iterator-api to iterate on the lowest
361
361
362
362
There is a feature flag of jackson called `ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT`. The intention is to decode input like `[]` as null, as PHP might treat empty object as empty array. To support this feature, we can register a extension
0 commit comments