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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:25:12+00:00 2026-05-24T19:25:12+00:00

I produce json using resteasy. Everything works fine but… I can’t order the parameters

  • 0

I produce json using resteasy.
Everything works fine but… I can’t order the parameters of my generated json:

In my serialized class, I have the following anotations:

@XmlRootElement
@XmlType(propOrder={"foo1", "foo2", "foo3"})

in my generated json, i get:

{"foo2":"bar2","foo1":"bar1","foo3":""}

There is the following dependency in my pom.xml

    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jackson-provider</artifactId>
        <version>2.2.0.GA</version>
    </dependency>

any idea?

  • 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-05-24T19:25:13+00:00Added an answer on May 24, 2026 at 7:25 pm

    A simple answer is that “it does not matter” — ordering of properties in JSON Object has no significance, so libraries and frameworks are free to output them in whatever order they want to.

    But more complex answer would be along lines of trying to maybe use Jackson’s own @JsonPropertyOrder annotation, which should work. Unless you absolutely must use JAXB annotations, that might solve your problem.

    Even so, this JAXB annotation should be supported by Jackson, when JAXB annotation mode is enabled. So if you need to use JAXB annotations, you need to try to figure out why support is not enabled. It may or may not be enabled with RESTeasy, since Jackson itself does not use them by default (i.e. framework has to explicitly enable then).

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

Sidebar

Related Questions

I'm using Newtonsoft.Json to turn json into objects, that works fine. I was wondering
I've started using json.net to produce better DateTimes, but I've noticed that one of
I am using the WCF JSON serializer to produce JSON for use as return
My service side code is implemented using Resteasy @GET @Path(/ad-details/{query}) @Produces(application/json) public String getAdDetails(@PathParam(query)
I have a problem with development resteay+ejb+json. Using Jboss-5.1.0.GA. I get example from resteasy-jaxrs
I produce server software and have been fine with all Linux environments so far,
I'm trying to produce sheets of photographs with captions arranged in a grid using
How can we produce the effect of the red line under a bad spelling
I'm trying to produce a report that has multiple grouping but does not just
I am using the RestEasy library to do JAX-RS web services. I am not

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.