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

  • Home
  • SEARCH
  • 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 9226143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:45:31+00:00 2026-06-18T04:45:31+00:00

I am using Jackson as JSON provider with Apache CXF. I would like to

  • 0

I am using Jackson as JSON provider with Apache CXF. I would like to use Jackson mix-ins to shape the structure of JSON returned by the REST controllers. The mix-ins would apply to domain objects (unannotated) to ignore some properties during serialization.

All the examples of mix-ins deal with their programmatic application, where you create an ObjectMapper object and apply mix-ins to it at runtime. In my REST layer, I am not using Jackson programmatically. It is registered as JSON provider for CXF (through blueprint XML – this is OSGI environment).

My question is how to apply mix-ins to Jackson without having to explicitly create ObjectMapper and call writeValue() on it. Also, how to apply mix-ins dynamically to allow a REST controller to return different representation of the same domain object based on request parameters?

Thank you,

Michael

  • 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-18T04:45:33+00:00Added an answer on June 18, 2026 at 4:45 am

    Check the Javadoc on JacksonJsonProvider:

    ObjectMapper to use can be configured in multiple ways:

    • By explicitly passing mapper to use in constructor
    • By explictly setting mapper to use by setMapper(com.fasterxml.jackson.databind.ObjectMapper)
    • By defining JAX-RS Provider that returns ObjectMappers.
    • By doing none of above, in which case a default mapper instance is constructed (and configured if configuration methods are called)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to write some JSON every 5th second. I'm using Jackson to
I am using Jackson and would like to pretty-print JSON such that each element
How would you deserialize a JSON document to a POJO using Jackson if you
I'm building REST API with Java (JAX-RS) using Jersey and I use Jackson as
For parsing JSON like this twitter API users/show response I've been using Jackson and
I'm trying to read a legacy JSON code using Jackson 2.0-RC3, however I'm stuck
I am using Jackson (2.1.1) for JSON serialization/deserialization. I have an existing class with
Can I use Jackson instead of JSON-lib with Groovy's HTTPBuilder when setting the body
I am using Jackson and a ContentNegotiatingViewResolver to return JSON from Spring controllers. When
I am using spring android rest template and trying to convert a JSON response

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.