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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:09:25+00:00 2026-05-10T17:09:25+00:00

To start, I know there are two kinds of JSON serialization currently built into

  • 0

To start, I know there are two ‘kinds’ of JSON serialization currently built into ASP.Net: you can either use the JavaScriptSerializer class to serialize your object to JSON or the new DataContractJsonSerializer class to convert a object to JSON.

If you use the JavaScriptSerializer() method, you must mark your class as Serializable() — if you use the DataContractJsonSerializer method, you must mark your class as DataContract(), and mark your properties as DataMembers().

If you want, you can specify a NAME attribute for each DataMembers, so when the property gets serialized/deserialized, it uses that name. For my purposes, I see this as being useful to make the JSON not so ‘wordy’. For example, instead of stating ‘UserID’ as my property (and having it repeat throughout my JSON object), I’d like to simply use ‘u’. Less data across the wire, etc.

The two serialization engines render a bit different, and you can only use the JavaScriptSerializer with ASP.Net Web/Script Methods. Therein lies my problem.

Is there a equivalent way of setting a property name to something else, strictly for the purposes of serialization/deserialization using the regular JavaScriptSerializer?

  • 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. 2026-05-10T17:09:25+00:00Added an answer on May 10, 2026 at 5:09 pm

    No, there isn’t.

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

Sidebar

Related Questions

Before I start, I know there is this post and it doesn't answer my
I start dicoverig C# today ... as you know there is some difuculties using
To start, I know that I have to have the </script> tag, and there
I know that we can start new activity with the steps as follows :
Before I start know this: I am extremely new to Java and programming. How
1) I know the start point of the arrow and I know the endpoint.
if you know the start and end positions in string from where to begin
I know the range name of the start of a list - 1 column
Anyone know a good book or post about how to start in EF? I
I know there is some kind of animation grouping mechanism in core animation. So

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.