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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:54:22+00:00 2026-05-25T18:54:22+00:00

i have a Json, i want to deserialize and save it inside the property

  • 0

i have a Json, i want to deserialize and save it inside the property of the class. but it has not been serialized using that class, is it possible to store the Json value in this class’s property..

HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("http://api.brightcove.com/services/library?command=find_playlist_by_id&token=myToken&playlist_id=61674080001&video_fields=id,name,thumbnailURL,playsTotal,shortDescription&page_size=1&sort_by=plays_total&sort_order=desc");
        HttpWebResponse response = (HttpWebResponse)request.GetResponse();

        using (StreamReader reads = new StreamReader(response.GetResponseStream()))
        {
            value = reads.ReadToEnd();
        }
        value = value.Remove(1, value.IndexOf("]") + 1);
        hidField.Value = value;



        JavaScriptSerializer s = new JavaScriptSerializer();
        BCVideos v =  s.Deserialize<BCVideos>(value);

class for the Storing Json Data.

public class BCVideos
{
    private int _id;

    public int Id
    {
        get { return _id; }
        set { _id = value; }
    }
    private string _name, _thumbnailUrl, _shortDescription;

    public string ShortDescription
    {
        get { return _shortDescription; }
        set { _shortDescription = value; }
    }

    public string ThumbnailUrl
    {
        get { return _thumbnailUrl; }
        set { _thumbnailUrl = value; }
    }

    public string Name
    {
        get { return _name; }
        set { _name = value; }
    }

}

Please reply if anyone have done this kind of work.

  • 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-25T18:54:23+00:00Added an answer on May 25, 2026 at 6:54 pm

    It is pretty difficult to follow your question, but I think you want to make a collection of BrightCove videos here if I remember BrightCove’s API correctly. So what you’d need is a 2-layered object — one container for the playlists that has an array of Videos. What you’ve got just covers the container. It should look something like:

    public class BrightCovePlayList
    {
        private int _id;
    
        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }
        private string _name, _thumbnailUrl, _shortDescription;
    
        public string ShortDescription
        {
            get { return _shortDescription; }
            set { _shortDescription = value; }
        }
    
        public string ThumbnailUrl
        {
            get { return _thumbnailUrl; }
            set { _thumbnailUrl = value; }
        }
    
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }
    
        public Video[] Videos {get; set; }
    }
    
    public class Video
    {
        public int Id {get; set;}
        public string Name {get; set;}
        //properties as appropriate.
    }
    

    PS: You probably want to use something like Hammock or at least System.Net.WebClient rather than raw webrequests here. You also might want to look at Json.net as it is a much better serialization library than the JavaScriptSerializer.

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

Sidebar

Related Questions

I have all this JSON text that I want to deserialize (or something) into
I have a view that I want to be converted into JSON. What is
Hi I want to create a JSON array. I have tried using: JSONArray jArray
I have a method to which I want to post some json data, that
I want to deserialize a JSON object (using GSON, because I already use it
I have dynamic json result and i want to create an object for that
I have a text file that is formatted like JSON, but in a print/view
I have a JSON stored in DB and I want to deserialize it into
Okay I have a JSON file and it has a set of objects that
I am currently using Json.Net to deserialize my JSON. I now have the following

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.