Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7986217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:47:34+00:00 2026-06-04T11:47:34+00:00

What Jackson POJO structure will be required based on this piece of json ?

  • 0

What Jackson POJO structure will be required based on this piece of json ?

Something like ? :

class POJO {

    private List<ToAddList> toAdd;
    private List<ToRemoveList> toRemove

}

class ToAddList(){
String name;
int pos;
}

class ToRemoveList(){
String name
}


///////////////////////JSON///////////////////////////
    {
        "toAdd": [
            {
                "name": "test",
                "pos": 0,
            },
            {
                "name": "test",
                "pos": 1,
            },
        ],
        "toRemove": [
            {
                "name": "test"
            },
            {
                "name": "test"
            }
        ]
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T11:47:37+00:00Added an answer on June 4, 2026 at 11:47 am

    You have a simple bean with two fields, a String and a Number. This bean is used in lists, which are contained in another bean:

    @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
    @JsonIgnoreProperties(ignoreUnknown = true)
    public class SimpleBean implements Serializable {
        private String name;
        private Integer pos;
    
        // constructors, getters, setters
    }
    
    @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
    @JsonIgnoreProperties(ignoreUnknown = true)
    public class RequestBean implements Serializable {
        private List<SimpleBean> toAdd;
        private List<SimpleBean> toRemove;
    
        // constructors, getters, setters
    }
    

    Thats it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For parsing JSON like this twitter API users/show response I've been using Jackson and
How would you deserialize a JSON document to a POJO using Jackson if you
Much like How to deserialize JSON file starting with an array in Jackson? I
I'm using the jackson library for serializing/deserializing to/from JSON. I need that this JSON
I'd like to use Jackson to parse JSON Bing results, but I'm a little
I have a class that looks like this: public class Person { public class
In the following Jackson/Java code that serializes objects into JSON, I am getting this:
I use jackson for converting JSON to Object class. JSON: { aaa:111, bbb:222, ccc:333
I'm using Jackson to deserialize a json array into some objects. Here's my class:
I need to build a java based JSON data API that will be accessed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.