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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:28:51+00:00 2026-05-23T19:28:51+00:00

UPDATED: I have the following code, where I am trying to use returned JSON

  • 0

UPDATED:

I have the following code, where I am trying to use returned JSON data, deserialize it, and return 1 part of that data back to the user.

<%@ Page Language="VB" Debug="True" EnableViewState="false" %>
<%@ Import Namespace="System.Web.Script.Serialization" %>

<script runat="server">
    Class Item
        Public Property some_number() As Double
            Get
                Return m_some_number
            End Get
            Set(ByVal value As Double)
                m_some_number = value
            End Set
        End Property
        Private m_some_number As Double
        Public Property some_text() As String
            Get
                Return m_some_text
            End Get
            Set(ByVal value As String)
                m_some_text = value
            End Set
        End Property
        Private m_some_text As String
        Public Property serial_number() As String
            Get
                Return m_serial_number
            End Get
            Set(ByVal value As String)
                m_serial_number = value
            End Set
        End Property
        Private m_serial_number As String
    End Class


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        Response.Clear()
        Response.Write(set_profiles())
        Response.End()
    End Sub

    Function set_profiles() As String
        ' get returned json data
        Dim strChanged As String = CType(Request.Form("strChanged"), String)

        ' deserialize returned data
        Dim jss = New JavaScriptSerializer()

        ' assuming i need to change this line now?
        Dim dict As Dictionary = jss.Deserialize(List(Of Item))(strChanged)

        Return dict("some_number")
    End Function
</script>

I don’t understand how to deserialize into the Item class, then how to get the data back out.

  • 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-23T19:28:52+00:00Added an answer on May 23, 2026 at 7:28 pm

    Your data is an array, and you’re trying to deserialize it into Dictionary. This won’t work.

    Either change your input data or deserialize it to an array.

    You can also declare a class and use it in the deserialization.

    C#, sorry:

    class Item
    {
        public double some_number { get; set; }
        public string some_text { get; set; }
        public string serial_number { get; set; }
    }
    

    and deserialize to List(Of Item)

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

Sidebar

Related Questions

I am trying to use link to submit a form using the following code:
I have the following code, in which I’m trying to process a large amount
I have the following javascript code, which loads without error, however the update function
I have the following query: UPDATE lessonstatus INNER JOIN user ON lessonstatus.user_id = user.user_id
I have an SQL query that takes the following form: UPDATE foo SET flag=true
I have a .csv file that is frequently updated (about 20 to 30 times
I have an application that is installed and updated via ClickOnce. The application downloads
I have a SQL Server 2000 database instance that is rarely updated. I also
I have a database that i'm dealing with which is updated every few hours
I'm trying to do the following: I have a set of images and select

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.