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 8784007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:58:26+00:00 2026-06-13T20:58:26+00:00

{ Filters: [{ Decription: Default, FieldSelected: { AppointmentDate: true, AppointmentDateOrder: 1 ptStatusOrder: 3 },

  • 0
{
    "Filters": [{
        "Decription": "Default",
        "FieldSelected": {
            "AppointmentDate": true,
            "AppointmentDateOrder": 1            
            "ptStatusOrder": 3
        },
        "FilterID": 1
    }, {
        "Decription": "chart",
        "FieldSelected": {
            "AppointmentDate": true,
            "AppointmentDateOrder": 1,           
            "ptStatusOrder": 0
        },
        "FilterID": 2
    }]
}

I am getting a response of this structure, how do i map it to my POJO class. Can anyone give a sample POJO class for this json structure. I am using Gson for Request and Response.

  • 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-13T20:58:28+00:00Added an answer on June 13, 2026 at 8:58 pm

    Just map one Json Object as a Java Class. And make an Array of Object as a List..

    Like, (pseudo code only)

    You are using GSON library so import SerializedName in your pojo classes.

    import com.google.gson.annotations.SerializedName;
    

    Pojo Class looks like,

    public class Filter {
    
        @SerializedName("Decription") // This requires same as your Json key 
        public String description;
        @SerializedName("FieldSelected") // The Json Object of FieldSelected
        public Field listDetails;
    
    }
    
    public class Field {
        @SerializedName("ptStatusOrder")
        public int status;
        @SerializedName("AppointmentDateOrder")
        public int dateOrder;
        @SerializedName("AppointmentDate")
        public boolean appDate;
    }
    

    And main ListFileter class,

    public class ListFilter {
    
            @SerializedName("Filters") 
            public List<Filter> listFilter;
    
        }
    

    And in Android code,

    Gson gson = new Gson();
    ListFilter listFilter = gson.fromJson(jsonResponse, ListFilter.class);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am prototyping some C# 3 collection filters and came across this. I have
I use this wonderful script to make my table sortable and add some filters
Filters like img {filter:flipV;} I'm guessing are pretty old, I just was asked by
CI Filters are now available in iOS 5, and I'm trying to apply one
def filters = { forUser(controller:'user', action:'*') { before = { user=springSecurityService.getCurrentUser() log.info(came to filter
I have some filters expressed as a list of function List(MyClass => Boolean) .
My workplace filters our internet traffic by forcing us to go through a proxy,
I have three tables filters (id, name) items(item_id, name) items_filters(item_id, filter_id, value_id) values(id, filter_id,
How to apply multiple filters in Adobe Pixelbender in Flash (=limited version)? For example
I have multiple filters in my application, with one at the root. <filter> <filter-name>root</filter-name>

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.