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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:23:03+00:00 2026-05-17T01:23:03+00:00

Hash.to_xml and other such Railsisms may result in element orderings being different in the

  • 0

Hash.to_xml and other such Railsisms may result in element orderings being different in the output of a REST service. XML Elems are order sensitive, so this would not be a problem for JSON or XML attributes.

What aspect of service definition best practices is this breaking that makes me think it is a smell ??

  • 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-17T01:23:03+00:00Added an answer on May 17, 2026 at 1:23 am

    Thinking of REST over HTTP, caching is a big leverage. Even if the inside is “semantically” the same, if it differs structurally then you could end up with a lot of Cache misses (e.g. done with ETags). Of course it depends “how” the comparison is done, but imho most Cache implementations use simple hashing of the returned payload as comparing-entity.

    So if Caching is important, I would tend to spit out also same structure for “semantically” same documents.

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

Sidebar

Related Questions

I'm using ActiveSupport's to_xml to generate some xml from a hash. I have need
I've been trying to serialize an object to xml and then hash the result
I need to create a keyed hash for a string of XML to send
I am using Perl with XML::Simple to convert a hash into an XML document.
Is there an easy way to convert a Nokogiri XML document to a Hash?
I'm trying to convert a hash to a XML-string with this module XML::Hash::LX but
When I do that {New York=>33, :Versailles => 3231}.to_xml I get <?xml version=\1.0\ encoding=\UTF-8\?>
Beginning rails programmer here. I'm trying to convert a hash to both xml and
Using perl's XML::SAX module I'm parsing (x)html templates, and as a result am simply
I am using Hash#to_xml in my Sinatra application. It did work till I moved

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.