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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:09:15+00:00 2026-06-07T13:09:15+00:00

I am trying to parse a json file which is been got from a

  • 0

I am trying to parse a json file which is been got from a file stream. Following is my json data

{
   "appname":"sine",
    "taborder":  [
            "some",
            "thing",
            "is",
            "went",
            "wrong"  ]
}

I am storing the data in a String and trying to deserialize the data. I am trying to show the keys in alert box in the following way

 string jsonString = contents;//"{'Name':'Bill', 'Ag:53}";
 you deserializedUser = ReadToObject(jsonString);

 var str = deserializedUser.mainDict.Keys.ToArray();
 MessageBox.Show(str.ToString());

But i am getting the key value as “null”, How to get the key values in proper , pls help me…..

  • 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-07T13:09:18+00:00Added an answer on June 7, 2026 at 1:09 pm

    I did this hope this helps

    protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
            {
        JavaScriptRequest obj= DeserializeJavaScriptRequest(typeof(JavaScriptRequest), Resource1.test) as JavaScriptRequest;
        MessageBox.Show(obj.appname +" | " + obj.taborder[0]);
    }
    
    public object DeserializeJavaScriptRequest(Type typedeserialize, string eValue)
            {
    
                Type t = typedeserialize;
            // Get constructor info.
            ConstructorInfo[] ci = t.GetConstructors();           
            object reflectOb = ci[0].Invoke(null);
            MemoryStream confirm_ms = new MemoryStream(Encoding.UTF8.GetBytes(eValue));
            DataContractJsonSerializer confirm_ser = new DataContractJsonSerializer(typedeserialize);
            reflectOb = confirm_ser.ReadObject(confirm_ms);
            confirm_ms.Close();
    
            return reflectOb;
        }
    

    And I made a class

     public class JavaScriptRequest
        {
            public string appname { get; set; }
            public string[] taborder { get; set; }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to parse the json values from the following stream: {id: tag:search.xxxxx.com,2005:xxxxxxxxxxx}
I'm trying to parse some huge JSON file (like http://eu.battle.net/auction-data/258993a3c6b974ef3e6f22ea6f822720/auctions.json ) using gson library
I;m trying to parse a json string which I receive from web server as
I am trying to parse the following JSON string remotely: [{name:Object1,data:[1,2]},{name:Object2,data:[3,4]}] I am doing
I'm trying to load and parse json data from an external source into a
I am trying to parse a json file of 5mb, which is causing out
I'm trying to parse json data from google directions but can't seem to access
I'm working on a 1 Gigabyte JSON text file which I'm trying to parse
I am trying to fetch a JSON file from my website and parse it.
I'm downloading a file and trying to use JSON.parse, which should return { dateTime:

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.