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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:19:35+00:00 2026-06-04T12:19:35+00:00

So I have this object: public class JournalItem { public string Description { get;

  • 0

So I have this object:

public class JournalItem
{
    public string Description { get; set; }
    public bool IsShared { get; set; }
    public bool IsDeleted { get; set; }
    public bool IsGroup { get; set; }
    public Guid Id { get; set; }
    public List<JournalItem> ChildEntities { get; set; }
}

It has a list of the same type of object there, ChildEntitites. I’ve got a page that posts an array of these back to the server as Json. Here’s the Json it returns:

[{"Description":"Develop social skills","Id":"d48749ea-2b50-4563-b47c-f2014b08c53a","IsShared":false,"IsDeleted":false,"IsGroup":false,"ChildEntitites":[]},{"Description":"Be more like Joel D.","Id":"a18749ea-2b50-4563-b47c-f2014b08d123","IsShared":true,"IsDeleted":false,"IsGroup":true,"ChildEntitites":[{"Description":"Wear cool glasses","Id":"77c56855-5626-4107-bc82-5862ccdb0943","IsShared":false,"IsDeleted":false,"IsGroup":false,"ChildEntitites":[]},{"Description":"Get 16GB of RAM","Id":"82081eab-b4ce-41fe-bcec-22178b7ed8e6","IsShared":false,"IsDeleted":false,"IsGroup":false,"ChildEntitites":[]}]},{"Description":"Nested group 1","Id":"9495f718-9e7b-4936-b1bf-112d1e7d3ef5","IsShared":false,"IsDeleted":false,"IsGroup":true,"ChildEntitites":[{"Description":"Nested group 2","Id":"70a7e919-1253-4dbd-b41b-49d8bd599657","IsShared":false,"IsDeleted":false,"IsGroup":true,"ChildEntitites":[{"Description":"Nested group 3","Id":"77bfcb11-cba2-48a9-8a1b-b4e0c9b1c5e1","IsShared":false,"IsDeleted":false,"IsGroup":true,"ChildEntitites":[{"Description":"Very nested objective","Id":"274c786b-d09c-4228-a18a-629d4ca9aed3","IsShared":false,"IsDeleted":true,"IsGroup":false,"ChildEntitites":[]}]}]}]}]

Here’s how I’m using JavaScriptSerilaiazer to conver it to an actual object:

var ser = new JavaScriptSerializer();
var journalStructure = ser.Deserialize<List<JournalItem>>(journalJson);

(I’ve also tried NewtonSoft with the same result)

This should give me an array of 3 items (which it does). The first item shouldn’t have any ChildEntities, but the second and third should have another list of JournalItems as their ChildEntities, but those are also both null.

How can I get one of these serializer things to deserialize the json array as a list? Can I do that?

  • 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-04T12:19:36+00:00Added an answer on June 4, 2026 at 12:19 pm

    It should work if you change ChildEntities to ChildEntitites (your json string contains this)

    Both Json.net and JavaScriptSerializer work.

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

Sidebar

Related Questions

I have this Payment object public class Payment { public Guid Id { get;
I have this class. public class Foo { public Guid Id { get; set;
I have this object : public class Person { public string FirstName { get;
I have this object: class a { public string Application; public DateTime From, To;
Assume I have this domain object... public class SpansMultipleTables { public int CommonID {get;
I have this object : public class MyObject { public int Id { get;
I have this class/object below: public class Person { public string FirstName; public string
I have this question. public class Foo : object { public override bool Equals(obj
I'm just wondering .. I have and object like this public class Entry{ public
I have this method in cs page: public String getToolTip(Object productId, Object imgBtnId) {

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.