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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:44:59+00:00 2026-06-11T08:44:59+00:00

I think I need to create a specialist ObjectMapper and cannot find any sample

  • 0

I think I need to create a specialist ObjectMapper and cannot find any sample code to start the process.

The creator of the JSON is using .Net and public properties and therefore uses field names with an uppercase initial. I am parsing the JSON into POJOs so I would like to use a lowercase initial.

At their end:

    public class Facet
    {
        public string Name { get; set; }
        public string  Value { get; set; }
    }

At my end I must therefore have:

    public class Facet {
        public String Name;
        public String Value;
    }

I would much prefer:

    public class Facet {
        public String name;
        public String value;
    }

Am I right that this could be done with an ObjectMapper?

  • 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-11T08:45:01+00:00Added an answer on June 11, 2026 at 8:45 am

    Your first issue can be addressed very simply with the @JsonProperty annotation:

    // java-side class
    public class Facet
    {
        @JsonProperty("Name")
        public String name;
    
        @JsonProperty("Value")
        public String value;
    }
    

    Now the ObjectMapper will match up the differently-cased field names. If you don’t want to add annotations into your classes, you can create a Mix-in class to stand in for your Facet:

    public class FacetMixIn
    {
        @JsonProperty("Name")
        public String name;
    
        @JsonProperty("Value")
        public String value;
    }
    
    objectMapper.getDeserializationConfig().addMixInAnnotations(Facet.class, FacetMixIn.class);
    

    This will achieve the same thing, without requiring additional annotations in your Facet class.

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

Sidebar

Related Questions

I think I need a way to perform a pivot or crosstab using C#
I don't think I need to post my code (there's lots of it) but
I think I might need to do something like the following pseudo-code in my
I'm in a situation where I think I need to create my own custom
i have a situation where i need to create some json from some id's
I think I may need to create a tool to assist in migrating DNS
I think I need to create a new base class for my controls, because
I need to create a custom jquery form validation using Jquery Validation Plugin where
I think I need a reverse version of strtok, like: char* p = rstrtok(str,
I think I need something akin to a rails eager loaded query with a

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.