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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:03:42+00:00 2026-05-30T21:03:42+00:00

This comment to an answer from John Saunders , a very high-rep member of

  • 0

This comment to an answer from John Saunders, a very high-rep member of Stack Overflow, says that returning an anonymous type from a web service is a bad practice.

Assuming I have the luxury of not caring about graceful degradation of my website in the face of users with Javascript disabled, why is it bad practice to have a service method, that exists only to be called via Ajax, return an anonymous object?

It seems like such a waste to whip up a concrete type, whose sole purpose is to hold my data for a few microseconds before asp.net serializes it into JSON.

  • 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-30T21:03:44+00:00Added an answer on May 30, 2026 at 9:03 pm

    My comment was specific to SOAP web services. Consumers of SOAP web services are accustomed to working with strongly-typed data, so returning an object of anonymous type via an object return type will force them to parse the XML, which they aren’t accustomed to doing.

    However, for clients which do not expect (or understand) strongly-typed data, my comment does not apply. If they are already accustomed to parsing XML, or evaling JSON, then returning an anonymous object won’t make that worse.

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

Sidebar

Related Questions

Recently I got a comment to this answer that I should stay away from
The comment to this answer got me wondering. I've always thought that C was
In a comment on this answer to another question , someone said that they
The question is from a comment I just added to the answer to this
Here, on Stack Overflow, if you try to comment a question/answer within 5 seconds
I came across a comment this answer which states that a library project: cannot
This question arose from the discussion in the comments of this answer . First,
I got a comment to my answer on this thread: Malloc inside a function
This comment confuses me: kill -l generally lists all signals. I thought that a
I read this comment in the OpenID post on the stackoverflow blog. Kibbee says

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.