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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:28:14+00:00 2026-05-30T15:28:14+00:00

I have a multidimensional array converted to JSON data in this format. [[null,null,null,null,null,null],[null,null,null,1,1,null],[null,null,null,null,1,1],[null,null,null,null,null,null],[null,null,null,null,null,null]] I

  • 0

I have a multidimensional array converted to JSON data in this format.

"[[null,null,null,null,null,null],[null,null,null,1,1,null],[null,null,null,null,1,1],[null,null,null,null,null,null],[null,null,null,null,null,null]]"

I am trying to conver this multidimensional array of strings/integers to equivalent form using JavascriptSerializer like this

 Dim retValue As List(Of String)
 Dim deserializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer()

retValue deserializer.Deserialize(Of List(Of String))(o.value) 

Its throwing an exception: Type 'System.String' is not supported for deserialization of an array.

I tried the same casting it to Integers
, but the same exception occured.

How can I perform the conversion using .NET 3.5.

I dont want to use JSON.NET dll’s , if System.Web.Script.Serialization.JavaScriptSerializer can do the job.

Any suggestions?

  • 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-30T15:28:16+00:00Added an answer on May 30, 2026 at 3:28 pm

    I tried two ways in achieving the solution:-

    As per “SeanCocteau’s comments:-

     Dim o As Object = JSONField
     Dim castObj() As Object = Nothing
     Dim ser As New DataContractJsonSerializer(GetType(System.Object))
    
     Using ms As New MemoryStream(System.Text.Encoding.UTF8.GetBytes(o.Value().ToString))
       castObj = ser.ReadObject(ms)
     End Using
    
     Dim convObject As ArrayList = New ArrayList(castObj)
    

    In this format, I was able to get the arrayList and then take each internal arrayList by iterating and casting appropriately

    Second solution I tried:-

        Dim o As Object =  JSONField
        Dim obj() As Object = (New JavaScriptSerializer()).Deserialize(Of Object)(o.Value.ToString())
        Dim convObject As ArrayList = New ArrayList(obj)
    

    In this format also , I was able to get the arrayList and then take each internal arrayList by iterating and casting appropriately

    Thanks SeanCocteau for giving the tip to Convert it to Object first 🙂

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

Sidebar

Related Questions

I have CSV data loaded into a multidimensional array. In this way each row
I have a multidimensional array of form data thats an been unserialized from YAML.
I have an multidimensional array that looks like this: Array ( [0] => Array
I have a multidimensional array that looks something like this: ourThing = array( 'id'
Possible Duplicate: Convert multidimensional array into single array I have this array: Array (
I have a string which represents a multidimensional array in the format: [[A, a],
I have an array which is multidimensional for no reason /* This is how
I have a multidimensional array in PHP like this: $array = array( Part1 =>
I have a multidimensional array that looks like this: Array ( [0] => Array
I have a multidimensional array and am trying to group them according to the

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.