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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:31:10+00:00 2026-06-16T06:31:10+00:00

I have a json string that is fetched by a web page. The json’s

  • 0

I have a json string that is fetched by a web page. The json’s schema is like this:

string schema = @"{
    'description': 'A person',
    'type': 'object',
    'properties':
    {
        'error': 
        {
            'type': 'object',
            'properties': 
            {
                'code': { 'type': 'integer' },
                'message': { 'type': 'string' }
            }
        },
        'response':
        {
            'type': 'object',
            'properties':
            {
                'code': { 'type': 'integer' },
                'status': { 'type': 'string' },
                'message': { 'type': ['string', 'object'] , 'items': {'type': 'string'}}
            }
        }
    }
}";

Everything is okay and the json is valid now.

For now, I want to convert a part of the json string to an array to loop throw it and put the data to a Grid.

The part that I told is like this:

[{\"id\":\"1\",\"task\":\"some message here...\",\"sender\":\"123qwe\",\"time\":\"1356136733\"}, [{\"id\":\"1\",\"task\":\"some message here...\",\"sender\":\"123qwe\",\"time\":\"1356136733\"}, ....

To access it , I use this:

var messages = (string)o["response"]["message"];//o is a JObject

Thanks in Advance!

  • 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-16T06:31:12+00:00Added an answer on June 16, 2026 at 6:31 am

    I figured out this by using dynamic type…:

    var jsonSerializer = new JsonSerializer();
                    dynamic stuff = jsonSerializer.Deserialize(new JsonTextReader(new StringReader(json)));
                    var ffff = stuff.response.message;
    
                    var jss = new JsonSerializer();
                    dynamic st = jsonSerializer.Deserialize(new JsonTextReader(new StringReader((string)ffff)));
    
                    var bv = 0;
                    foreach (var msg in st)
                    {
                        bv++;
                    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JSON string that looks like this: { package1: { type: envelope,
Hi I have a JSON string that looks like this (Usingt Rails and a
I have a JSON string that looks something like this: {addresses:{address:[{@array:true,@id:888888,@uri:xyz,household:{@id:44444,@uri:xyz},person:{@id:,@uri:},addressType:{@id:1,@uri:xyz,name:Primary},address1:xyz,address2:null,address3:null,city:xyz,postalCode:111111}]}} What would be
I have an PHP array parsed from a JSON string that looks like this:
I have a JSON string that I would like to include as a value
I have a json string like this: { d: { results: [ { __metadata:
I have this JSON string that I am recieving after I make a purchase
I have a JSON string that I would like to convert to a javascript
I have a JSON string that looks like {\heading\:\Test\,\id\:1} and I want to wipe
I have an object model called MyObject that I'm serializing to a json string

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.