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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:50:20+00:00 2026-06-10T10:50:20+00:00

I am working on a Windows 8 app wherein I need to deserialize a

  • 0

I am working on a Windows 8 app wherein I need to deserialize a JSON feed that contains variables which begin with an ‘@’ sign.
I’ve defined classes that have members with the same names as the variables in the JSON, then call DataContractJsonSerializer to deserialize the JSON into C# classes. This all works fine and dandy except for the variable names that begin with ‘@’.
Like this:

public class HotelDetails
{
    public string hotelId;
    public string name;
    public string address1;
...

}

The JSON looks like this:

{"@order":"0",
   "hotelId":268026,
   "name":"Monte Cristo",
   "address1":"600 Presidio Avenue",
...

Since I can’t define a C# variable that begins with ‘@’ how do I deserialize the “@order” variable?

  • 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-10T10:50:21+00:00Added an answer on June 10, 2026 at 10:50 am

    Try this?

    [DataContract]
    public class HotelDetails
    {
        [DataMember(Name="@order")]
        public string order;
    
        [DataMember(Name="hotelId")]    
        public string hotelId;
    
        [DataMember(Name="name")]  
        public string name;
    
        [DataMember(Name="address1")]  
        public string address1;
    }
    

    Don’t know if that works though… haven’t tested it.

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

Sidebar

Related Questions

We're working on a Windows App that periodically has to launch operations which may
I am working on a Windows 8 app. I need to know how to
I have been working with a Windows Mobile 6 app that is built with
I'm working windows phone 7 app which loads an image inside a HyperlinkButton. This
I'm working on an windows app. This app contains a dynamic list of names,
Im working on a MVVM Windows phone app that displays weather info. When the
I'm working on a Windows Phone 7 app that requires some data encryption. I'm
I have an old Windows app, compiled in Visual C++ 6.0, that I need
I am working on a windows app that has the functionality to set overlay
I'm working on a windows App in C#, I have a for-loop which update

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.