Jackson 註解示例

Data,Jackson
Remote
0
11:17 PM · Nov 30 ,2025

1. 概述

在本教程中,我們將深入探討 Jackson 註解

我們將學習如何使用現有的註解,如何創建自定義註解,以及如何禁用它們。

2. Jackson Serialization Annotations

First, we’ll take a look at the serialization annotations.

2.1. @JsonAnyGetter

The @JsonAnyGetter annotation allows for the flexibility of using a Map field as standard properties.

For example, the ExtendableBean entity has the name property and a set of extendable attributes in the form of key/value pairs:

public class ExtendableBean {
    public String name;
    private Map<String, String> properties;

    @JsonAnyGetter
    public Map<String, String> getProperties() {
        return properties;
    }
}

When we serialize an instance of this entity, we get all the key-values in the Map as standard, plain properties:


{
    "name":"My bean",
    "attr2":"val2",
    "attr1":"val1"
}

Here’s how the serialization of this entity looks in practice:

@Test
public void whenSerializingUsingJsonAnyGetter_thenCorrect()
  throws JsonProcessingException {
 
    ExtendableBean bean = new ExtendableBean("My bean");
    bean.add("attr1", "val1");
    bean.add("attr2", "val2");

    String result = new ObjectMapper().writeValueAsString(bean);
 
    assertThat(result, containsString("attr1"));
    assertThat(result, containsString("val1"));
}

We can also use the optional argument enabled as false to disable @JsonAnyGetter. In this case, the Map will be converted as JSON and will appear under the properties variable after serialization.

2.2. @JsonGetter

The @JsonGetter annotation is an alternative to the @JsonProperty annotation, which marks a method as a getter method.

In the following example, we specify the method getTheName() as the getter method of the name property of a MyBean entity:

public class MyBean {
    public int id;
    private String name;

    @JsonGetter("name")
    public String getTheName() {
        return name;
    }
}

Here’s how this works in practice:

@Test
public void whenSerializingUsingJsonGetter_thenCorrect()
  throws JsonProcessingException {
 
    MyBean bean = new MyBean(1, "My bean");

    String result = new ObjectMapper().writeValueAsString(bean);
 
    assertThat(result, containsString("My bean"));
    assertThat(result, containsString("1"));
}

We can also use the @JsonProperty annotation to specify the name of the property.

2.3. @JsonPropertyOrder

We can use the @JsonPropertyOrder annotation to specify the order of properties on serialization.

Let’s set a custom order for the properties of a MyBean entity:

@JsonPropertyOrder({ "name", "id" })
public class MyBean {
    public int id;
    public String name;
}

Here’s the output of serialization:


{
    "name":"My bean",
    "id":1
}

Then we can do a simple test:

@Test
public void whenSerializingUsingJsonPropertyOrder_thenCorrect()
  throws JsonProcessingException {
 
    MyBean bean = new MyBean(1, "My bean");

    String result = new ObjectMapper().writeValueAsString(bean);
    assertThat(result, containsString("My bean"));
    assertThat(result, containsString("1"));
}

We can also use @JsonPropertyOrder(alphabetic=true) to order the properties alphabetically. In that case, the output of serialization will be:


{
    "id":1,
    "name":"My bean"
}

2.4. @JsonRawValue

The @JsonRawValue annotation can instruct Jackson to serialize a property exactly as is.

In the following example, we use @JsonRawValue to embed some custom JSON as a value of an entity:

public class RawBean {
    public String name;

    @JsonRawValue
    public String json;
}

The output of serializing the entity is:


{
    "name":"My bean",
    "json":"{\"attr\":false}"
}

Next, here’s a simple test:

@Test
public void whenSerializingUsingJsonRawValue_thenCorrect()
  throws JsonProcessingException {
 
    RawBean bean = new RawBean("My bean", "{\"attr\":false}");

    String result = new ObjectMapper().writeValueAsString(bean);
    assertThat(result, containsString("My bean"));
    assertThat(result, containsString("{\"attr\":false}"));
}

We can also use the optional boolean argument value that defines whether this annotation is active or not.

2.5. @JsonValue

@JsonValue indicates a single method the library will use to serialize the entire instance.

For example, in an enum, we annotate the getName with @JsonValue so that any such entity is serialized via its name:

public enum TypeEnumWithValue {
    TYPE1(1, "Type A"), TYPE2(2, "Type 2");

    private Integer id;
    private String name;

    // standard constructors

    @JsonValue
    public String getName() {
        return name;
    }
}

Now let’s use these in a test:

@Test
public void whenSerializingUsingJsonValue_thenCorrect()
  throws JsonParseException, IOException {
 
    String enumAsString = new ObjectMapper()
      .writeValueAsString(TypeEnumWithValue.TYPE1);

    assertThat(enumAsString, is(""Type A""));
}

2.6. @JsonRootName

The @JsonRootName annotation is used, if the wrapping is enabled, to specify the name of the root wrapper to be used.

Wrapping means that instead of serializing a User to something like:


{
    "id": 1,
    "name": "John"
}

It’s going to be wrapped like this:


{
    "User": {
        "id": 1,
        "name": "John"
    }
}

So let’s look at an example. We’re going to use the @JsonRootName annotation to indicate the name of this potential wrapper entity:

@JsonRootName(value = "user")
public class UserWithRoot {
    public int id;
    public String name;

    // ...
}

Since Jackson 2.4, a new optional argument namespace is available with data formats such as XML. If we add it, it will become part of the fully qualified name:

@JsonRootName(value = "user", namespace="users")
public class UserWithRootNamespace {
    public int id;
    public String name;

    // ...
}

If we serialize it with XmlMapper, the output will be:

<user xmlns="users">
    <id xmlns="">1</id>
    <name xmlns="">John</name>
    <items xmlns=""/>
</user>

2.7. @JsonSerialize

@JsonSerialize indicates a custom serializer to use when marshalling the entity.

Let’s look at a quick example. We’re going to use @JsonSerialize to serialize the eventDate property with a CustomDateSerializer:

public class EventWithSerializer {
    public String name;

    @JsonSerialize(using = CustomDateSerializer.class)
    public Date eventDate;
}

Here’s the simple custom Jackson serializer:

public class CustomDateSerializer extends StdSerializer<Date> {

    private static SimpleDateFormat formatter
      = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss");

    public CustomDateSerializer() {
        this(null);
    }

    public CustomDateSerializer(Class<Date> t) {
        super(t);
    }

    @Override
    public void serialize(
      Date value, JsonGenerator gen, SerializerProvider arg2)
      throws IOException, JsonProcessingException {
        gen.writeString(formatter.format(value));
    }
}

Now let’s use these in a test:

@Test
public void whenSerializingUsingJsonSerialize_thenCorrect()
  throws JsonProcessingException {
 
    SimpleDateFormat df
      = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss");

    String toParse = "20-12-2014 02:30:00";
    Date date = df.parse(toParse);
    EventWithSerializer event = new EventWithSerializer("party", date);

    String result = new ObjectMapper().writeValueAsString(event);
    assertThat(result, containsString(toParse));
}

3. Jackson Deserialization Annotations

Next let’s explore the Jackson deserialization annotations.

3.1. @JsonCreator

We can use the @JsonCreatorannotation to tune the constructor/factory used in deserialization.

It’s very useful when we need to deserialize some JSON that doesn’t exactly match the target entity we need to get.

Let’s look at an example. Say we need to deserialize the following JSON:


{
    "id":1,
    "theName":"My bean"
}

However, there is no theName field in our target entity, there is only a name field. Now we don’t want to change the entity itself, we just need a little more control over the unmarshalling process by annotating the constructor with @JsonCreator, and using the @JsonProperty annotation as well:


public class BeanWithCreator {
    public int id;
    public String name;

    @JsonCreator
    public BeanWithCreator(
      @JsonProperty("id") int id, 
      @JsonProperty("theName") String name) {
        this.id = id;
        this.name = name;
    }
}

Let’s see this in action:


@Test
public void whenDeserializingUsingJsonCreator_thenCorrect()
  throws IOException {
 
    String json = "{\"id\":1,\"theName\":\"My bean\"}";

    BeanWithCreator bean = new ObjectMapper()
      .readerFor(BeanWithCreator.class)
      .readValue(json);
    assertEquals("My bean", bean.name);
}

3.2. @JacksonInject

<@JacksonInject indicates that a property will get its value from the injection and not from the JSON data.

In the following example, we use @JacksonInject to inject the property id:


public class BeanWithInject {
    @JacksonInject
    public int id;
    
    public String name;
}

Here’s how it works:


@Test
public void whenDeserializingUsingJsonInject_thenCorrect()
  throws IOException {
 
    String json = "{\"name\":\"My bean\"}";
    
    InjectableValues inject = new InjectableValues.Std()
      .addValue(int.class, 1);
    BeanWithInject bean = new ObjectMapper().reader(inject)
      .forType(BeanWithInject.class)
      .readValue(json);
    
    assertEquals("My bean", bean.name);
    assertEquals(1, bean.id);
}

3.3. @JsonAnySetter

<@JsonAnySetter allows us the flexibility of using a Map as standard properties. On deserialization, the properties from JSON will simply be added to the map.

First, we’ll use @JsonAnySetter to deserialize the entity ExtendableBean:


public class ExtendableBean {
    public String name;
    private Map<String, String> properties;

    @JsonAnySetter
    public void add(String key, String value) {
        properties.put(key, value);
    }
}

This is the JSON we need to deserialize:


{
    "name":"My bean",
    "attr2":"val2",
    "attr1":"val1"
}

Then here’s how it all ties in together:


@Test
public void whenDeserializingUsingJsonAnySetter_thenCorrect()
  throws IOException {
    String json
      = "{\"name\":\"My bean\",\"attr2\":\"val2\",\"attr1\":\"val1\"}";

    ExtendableBean bean = new ObjectMapper()
      .readerFor(ExtendableBean.class)
      .readValue(json);
    
    assertEquals("My bean", bean.name);
    assertEquals("val2", bean.getProperties().get("attr2"));
}

3.4. @JsonSetter

<@JsonSetter is an alternative to @JsonProperty that marks the method as a setter method.

This is incredibly useful when we need to read some JSON data, but the target entity class doesn’t exactly match that data, and so we need to tune the process to make it fit.

In the following example, we’ll specify the method setTheName() as the setter of the name property in our MyBean entity:


public class MyBean {
    public int id;
    private String name;

    @JsonSetter("name")
    public void setTheName(String name) {
        this.name = name;
    }
}

Now when we need to unmarshall some JSON data, this works perfectly well:


@Test
public void whenDeserializingUsingJsonSetter_thenCorrect()
  throws IOException {
 
    String json = "{\"id\":1,\"name\":\"My bean\"}";

    MyBean bean = new ObjectMapper()
      .readerFor(MyBean.class)
      .readValue(json);
    assertEquals("My bean", bean.getTheName());
}

3.5. @JsonDeserialize

<@JsonDeserialize indicates the use of a custom deserializer.

First, we’ll use @JsonDeserialize to deserialize the eventDate property with the CustomDateDeserializer:


public class EventWithSerializer {
    public String name;

    @JsonDeserialize(using = CustomDateDeserializer.class)
    public Date eventDate;
}

Here’s the custom deserializer:


public class CustomDateDeserializer
  extends StdDeserializer<Date> {

    private static SimpleDateFormat formatter
      = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss");

    public CustomDateDeserializer() { 
        this(null); 
    } 

    public CustomDateDeserializer(Class<?> vc) { 
        super(vc); 
    }

    @Override
    public Date deserialize(
      JsonParser jsonparser, DeserializationContext context) 
      throws IOException {
        
        String date = jsonparser.getText();
        try {
            return formatter.parse(date);
        } catch (ParseException e) {
            throw new RuntimeException(e);
        }
    }
}

Next here’s the back-to-back test:


@Test
public void whenDeserializingUsingJsonDeserialize_thenCorrect()
  throws IOException {
 
    String json
      = "{\"name\":\"party\",\"eventDate\":\"20-12-2014 02:30:00\"}";

    SimpleDateFormat df
      = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss");
    EventWithSerializer event = new ObjectMapper()
      .readerFor(EventWithSerializer.class)
      .readValue(json);
    
    assertEquals(
      "20-12-2014 02:30:00", df.format(event.eventDate));
}

3.6. @JsonAlias

<@JsonAlias defines one or more alternative names for a property during deserialization.

Let’s see how this annotation works with a quick example:


public class AliasBean {
    @JsonAlias({ "fName", "f_name" })
    private String firstName;   
    private String lastName;
}

Here we have a POJO, and we want to deserialize JSON with values such as fName, f_name, and firstName into the firstName variable of the POJO.

Below is a test making sure this annotation works as expected:


@Test
public void whenDeserializingUsingJsonAlias_thenCorrect() throws IOException {
    String json = "{\"fName\": \"John\", \"lastName\": \"Green\"}";
    AliasBean aliasBean = new ObjectMapper().readerFor(AliasBean.class).readValue(json);
    assertEquals("John", aliasBean.getFirstName());
}

4. Jackson Property Inclusion Annotations

@JsonIgnoreProperties" lang="en">4.1. @JsonIgnoreProperties

@JsonIgnoreProperties is a class-level annotation that marks a property or a list of properties that Jackson will ignore.

Let’s look at a quick example ignoring the property id from serialization:

@JsonIgnoreProperties({ "id" })
public class BeanWithIgnore {
    public int id;
    public String name;
}

Now here’s the test making sure the ignore happens:

@Test
public void whenSerializingUsingJsonIgnoreProperties_thenCorrect()
  throws JsonProcessingException {
 
    BeanWithIgnore bean = new BeanWithIgnore(1, "My bean");

    String result = new ObjectMapper()
      .writeValueAsString(bean);
    
    assertThat(result, containsString("My bean"));
    assertThat(result, not(containsString("id")));
}

To ignore any unknown properties in JSON input without exception, we can set ignoreUnknown=true of @JsonIgnoreProperties annotation.

@JsonIgnore" lang="en">4.2. @JsonIgnore

@JsonIgnore annotation is used to mark a property to be ignored at the field level." lang="en">@JsonIgnore annotation is used to mark a property to be ignored at the field level.

Let’s use @JsonIgnore to ignore the property id from serialization:

public class BeanWithIgnore {
    @JsonIgnore
    public int id;

    public String name;
}

Then we’ll test to make sure that id was successfully ignored:

@Test
public void whenSerializingUsingJsonIgnore_thenCorrect()
  throws JsonProcessingException {
 
    BeanWithIgnore bean = new BeanWithIgnore(1, "My bean");

    String result = new ObjectMapper()
      .writeValueAsString(bean);
    
    assertThat(result, containsString("My bean"));
    assertThat(result, not(containsString("id")));
}

@JsonIgnoreType" lang="en">4.3. @JsonIgnoreType

@JsonIgnoreType marks all properties of an annotated type to be ignored.

We can use the annotation to mark all properties of type Name to be ignored:

public class User {
    public int id;
    public Name name;

    @JsonIgnoreType
    public static class Name {
        public String firstName;
        public String lastName;
    }
}

We can also test to ensure the ignore works correctly:

@Test
public void whenSerializingUsingJsonIgnoreType_thenCorrect()
  throws JsonProcessingException, ParseException {
 
    User.Name name = new User.Name("John", "Doe");
    User user = new User(1, name);

    String result = new ObjectMapper()
      .writeValueAsString(user);

    assertThat(result, containsString("1"));
    assertThat(result, not(containsString("name")));
    assertThat(result, not(containsString("John")));
}

@JsonInclude" lang="en">4.4. @JsonInclude

@JsonInclude to exclude properties with empty/null/default values." lang="en">@JsonInclude annotation to exclude properties with empty/null/default values.

Let’s look at an example excluding nulls from serialization:

@JsonInclude(Include.NON_NULL)
public class MyBean {
    public int id;
    public String name;
}

Here’s the full test:

@Test
public void whenSerializingUsingJsonInclude_thenCorrect()
  throws JsonProcessingException {
 
    MyBean bean = new MyBean(1, null);

    String result = new ObjectMapper()
      .writeValueAsString(bean);
    
    assertThat(result, containsString("1"));
    assertThat(result, not(containsString("name")));
}

@JsonIncludeProperties" lang="en">4.5. @JsonIncludeProperties

@JsonIncludeProperties annotation is one of the most requested Jackson features. It was introduced in Jackson 2.12 and can be used to mark a property or a list of properties that Jackson will include during serialization and deserialization.

Let’s look at a quick example including the property name from serialization:

@JsonIncludeProperties({ "name" })
public class BeanWithInclude {
    public int id;
    public String name;
}

Now here’s a test making sure we include only the name property:

@Test
public void whenSerializingUsingJsonIncludeProperties_thenCorrect() throws JsonProcessingException {
    final BeanWithInclude bean = new BeanWithInclude(1, "My bean");
    final String result = new ObjectMapper().writeValueAsString(bean);
    assertThat(result, containsString("My bean"));
    assertThat(result, not(containsString("id")));
    assertThat(result, containsString("name"));
}

@JsonAutoDetect" lang="en">4.6. @JsonAutoDetect

@JsonAutoDetect annotation can override the default semantics of which properties are visible and which are not.

First, let’s take a look at how the annotation can be very helpful with a simple example; let’s enable serializing private properties:

@JsonAutoDetect(fieldVisibility = Visibility.ANY)
public class PrivateBean {
    private int id;
    private String name;
}

Then the test:

@Test
public void whenSerializingUsingJsonAutoDetect_thenCorrect()
  throws JsonProcessingException {
 
    PrivateBean bean = new PrivateBean(1, "My bean");

    String result = new ObjectMapper()
      .writeValueAsString(bean);
    
    assertThat(result, containsString("1"));
    assertThat(result, containsString("My bean"));
}

5. Jackson 多態類型處理註解接下來,讓我們看看 Jackson 的多態類型處理註解:

@JsonTypeInfo – 指示在序列化中包含哪些類型信息@JsonSubTypes – 指示對註解的類型子類的指示@JsonTypeName – 定義用於註解的類使用的邏輯類型名稱讓我們研究一個更復雜的例子,並使用三個註解——@JsonTypeInfo, @JsonSubTypes,和@JsonTypeName來序列化/反序列化實體 Zoo

public class Zoo {
    public Animal animal;

    @JsonTypeInfo(
      use = JsonTypeInfo.Id.NAME, 
      include = As.PROPERTY, 
      property = "type")
    @JsonSubTypes({
        @JsonSubTypes.Type(value = Dog.class, name = "dog"),
        @JsonSubTypes.Type(value = Cat.class, name = "cat")
    })
    public static class Animal {
        public String name;
    }

    @JsonTypeName("dog")
    public static class Dog extends Animal {
        public double barkVolume;
    }

    @JsonTypeName("cat")
    public static class Cat extends Animal {
        boolean likesCream;
        public int lives;
    }
}

當我們進行序列化時:

@Test
public void whenSerializingPolymorphic_thenCorrect()
  throws JsonProcessingException {
    Zoo.Dog dog = new Zoo.Dog("lacy");
    Zoo zoo = new Zoo(dog);

    String result = new ObjectMapper()
      .writeValueAsString(zoo);

    assertThat(result, containsString("type"));
    assertThat(result, containsString("dog"));
}

以下是使用 Dog 實例序列化 Zoo 實例的結果:

{
    "animal": {
        "type": "dog",
        "name": "lacy",
        "barkVolume": 0
    }
}

現在,讓我們進行反序列化。讓我們從以下 JSON 輸入開始:

{
    "animal":{
        "name":"lacy",
        "type":"cat"
    }
}

然後讓我們看看如何將其反序列化為 Zoo 實例:

@Test
public void whenDeserializingPolymorphic_thenCorrect()
throws IOException {
    String json = "{\"animal\":{\"name\":\"lacy\",\"type\":\"cat\"}}";

    Zoo zoo = new ObjectMapper()
      .readerFor(Zoo.class)
      .readValue(json);

    assertEquals("lacy", zoo.animal.name);
    assertEquals(Zoo.Cat.class, zoo.animal.getClass());
}

6. Jackson General Annotations

Next let’s discuss some of Jackson’s more general annotations.

6.1. @JsonProperty

We can add the @JsonProperty annotation to indicate the property name in JSON

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(StringNay) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void setTheName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property name

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property name

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

Let’s use @JsonProperty to serialize/deserialize the property


Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property


Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public void set nižšíName(String name) {
        this.name = name;
    }

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

Let’s use @JsonProperty to serialize/deserialize the property

public class MyBean {
    public int id;
    private String name;

    @JsonProperty("name")
    public String getTheName() {
        return name;
    }
}

The question is asking for a concise explanation of how the `JsonProperty` annotation works in Java. The `JsonProperty` annotation is used with the Jackson library to tell Jackson that a field should be mapped to a field in a JSON object. It's used when the field name in the JSON object doesn't match the name of the corresponding field in the Java class. Here's a breakdown: 1. **Purpose:** The `JsonProperty` annotation is part of the Jackson library, a popular Java library for JSON processing. 2. **Mapping:** It allows you to map a JSON field to a Java field even if their names are different. This is crucial when dealing with JSON data where the field names might not directly correspond to the names of the fields in your Java classes. 3. **Usage:** You apply the `@JsonProperty` annotation to a field in your Java class. You can then specify the JSON field name to which this Java field should be mapped. 4. **Example:** java import com.fasterxml.jackson.annotation.JsonProperty; public class MyBean { @JsonProperty("jsonName") // Maps to the field "jsonName" private String name; } In this example, the `name` field in the `MyBean` class is mapped to the JSON field named "jsonName". 5. **Benefits:** * **Flexibility:** It makes your code more flexible when dealing with JSON data that has different field names than your Java classes. * **Maintainability:** It improves code maintainability by clearly indicating how JSON fields are mapped to Java fields. In essence, `@JsonProperty` provides a way to bridge the gap between JSON field names and Java field names, making JSON processing more robust and adaptable.

7. 自定義 Jackson 註解接下來,讓我們看看如何創建自定義 Jackson 註解。我們可以利用 @JacksonAnnotationsInside 註解:

@Retention(RetentionPolicy.RUNTIME)
    @JacksonAnnotationsInside
    @JsonInclude(Include.NON_NULL)
    @JsonPropertyOrder({ "name", "id", "dateCreated" })
    public @interface CustomAnnotation {}

現在,如果我們使用新的註解在實體上:

@CustomAnnotation
public class BeanWithCustomAnnotation {
    public int id;
    public String name;
    public Date dateCreated;
}

我們可以看到它如何將現有的註解組合成一個簡單的自定義註解,我們可以用作簡寫:

@Test
public void whenSerializingUsingCustomAnnotation_thenCorrect()
  throws JsonProcessingException {
    BeanWithCustomAnnotation bean 
      = new BeanWithCustomAnnotation(1, "My bean", null);

    String result = new ObjectMapper().writeValueAsString(bean);

    assertThat(result, containsString("My bean"));
    assertThat(result, containsString("1"));
    assertThat(result, not(containsString("dateCreated")));
}

序列化過程的輸出:

{
    "name":"My bean",
    "id":1
}

8. Jackson MixIn 註解接下來,讓我們看看如何使用 Jackson MixIn 註解。

例如,我們使用 MixIn 註解來忽略類型為 User 的屬性:

public class Item {
    public int id;
    public String itemName;
    public User owner;
}
@JsonIgnoreType
public class MyMixInForIgnoreType {}

然後讓我們看看它的實際應用:

@Test
public void whenSerializingUsingMixInAnnotation_thenCorrect()
  throws JsonProcessingException {
    Item item = new Item(1, "book", null);

    String result = new ObjectMapper().writeValueAsString(item);
    assertThat(result, containsString("owner"));

    ObjectMapper mapper = new ObjectMapper();
    mapper.addMixIn(User.class, MyMixInForIgnoreType.class);

    result = mapper.writeValueAsString(item);
    assertThat(result, not(containsString("owner")));
}

9. 禁用 Jackson 註解最後,讓我們看看如何禁用所有 Jackson 註解。我們可以通過禁用 MapperFeature 來實現。 如下所示的例子:

@JsonInclude(Include.NON_NULL)
@JsonPropertyOrder({ "name", "id" })
public class MyBean {
    public int id;
    public String name;
}

在禁用註解後,這些應該沒有影響,並且庫的默認設置應該適用:

@Test
public void whenDisablingAllAnnotations_thenAllDisabled()
  throws IOException {
    MyBean bean = new MyBean(1, null);

    ObjectMapper mapper = new ObjectMapper();
    mapper.disable(MapperFeature.USE_ANNOTATIONS);
    String result = mapper.writeValueAsString(bean);
    
    assertThat(result, containsString("1"));
    assertThat(result, containsString("name"));
}

禁用註解之前的序列化結果:

{"id":1}

禁用註解之後的序列化結果:

 {
    "id":1,
    "name":null
}

10. 結論

在本文中,我們探討了 Jackson 註解,只是利用它們正確的方法,窺探了我們能夠獲得的靈活性的一角。

user avatar
0 位用戶收藏了這個故事!
收藏

發佈 評論

Some HTML is okay.