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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:08:39+00:00 2026-05-23T04:08:39+00:00

I have an object that looks like this: public MyObject { public int ObjectID

  • 0

I have an object that looks like this:

public MyObject
{
  public int ObjectID {get;set;}
  public byte ObjectStatus {get;set;}
  public List<MySubObject1> {get;set}
  public List<MySubObject2> {get;set}
  ...
  public List<MySubObject9> {get;set}

  public string MySubObject1InJson {get;set;}
  ...
  public string MySubObject9InJson {get;set;}

  public string ObjectInJson {get;set;}

}

This object contains 9 lists and 9 strings for each list in jsonformat and ObjectInJson string for the full object.

And then, I have a list of MyObject.

I’m using JavascriptSerializer: I first serialize each list for each object and store the corresponding string on the InJson variable. Then, I serialize each MyObject by including only the int, byte and json strings of lists. Finally, I serialize the list of MyObject.

I end up with a string that has a lot of \\\” in it and I was wondering if someone had come across such problem with the .net json serializer.

[{"ObjectID":1492,"ObjectStatus":2,"ObjectJsonFormat":"{\"ObjectID\":1492,\"LStatus\":2,\"LAppoints\":\"[{\\\"AppointID\\\":23350,\\\"AppointType\\\":2,\\\"AppointStatus\\\":3,\\\"AppointDate\\\":\\\"4/23/2011\\\",\\\"AppointTime\\\":\\\"6:49 PM\\\",\\\"AppointSetDate\\\":\\\"4/23/2011\\\",\\\"AppointSetTime\\\":\\\"6:49 PM\\\",\\\"AppointResolvDate\\\":\\\"4/28/2011\\\",\\\"AppointResolvTime\\\":\\\"6:49 PM\\\",\\\"AppointFirst\\\":\\\"NATHAN\\\",\\\"AppointLast\\\":\\\"WEST\\\",\\\"ContactFirstLastListing\\\":\\\"NATHAN WEST\\\"},{\\\"AppointID\\\":23351,\\\"AppointType\\\":1,\\\"AppointStatus\\\":2,\\\"AppointDate\\\":\\\"4/23/2011\\\",\\\"AppointTime\\\":\\\"8:19 PM\\\",\\\"AppointSetDate\\\":\\\"4/23/2011\\\",\\\"AppointSetTime\\\":\\\"8:19 PM\\\",\\\"AppointResolvDate\\\":\\\"4/28/2011\\\",\\\"AppointResolvTime\\\":\\\"8:19 PM\\\",\\\"AppointFirst\\\":\\\"DALE\\\",\\\"AppointLast\\\":\\\"JORDAN\\\",\\\"ContactFirstLastListing\\\":\\\"DALE JORDAN\\\"},{\\\"AppointID\\\":23352,\\\"AppointType\\\":1,\\\"AppointStatus\\\":3,\\\"AppointDate\\\":\\\"4/23/2011\\\",\\\"AppointTime\\\":\\\"9:49 PM\\\",\\\"AppointSetDate\\\":\\\"4/23/2011\\\",\\\"AppointSetTime\\\":\\\"9:49 PM\\\",\\\"AppointResolvDate\\\":\\\"4/28/2011\\\",\\\"AppointResolvTime\\\":\\\"9:49 PM\\\",\\\"AppointFirst\\\":\\\"MANUEL\\\",\\\"AppointLast\\\":\\\"WOODS\\\",\\\"ContactFirstLastListing\\\":\\\"MANUEL WOODS\\\"}]\",\"LNotes\":\"[{\\\"NoteID\\\":14201,\\\"NoteText\\\":\\\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostr\\\",\\\"NoteDate\\\":\\\"1/10/2011\\\",\\\"NoteTime\\\":\\\"11:54 AM\\\"},{\\\"NoteID\\\":14202,\\\"NoteText\\\":\\\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostr\\\",\\\"NoteDate\\\":\\\"1/10/2011\\\",\\\"NoteTime\\\":\\\"12:24 PM\\\"},{\\\"NoteID\\\":14203,\\\"NoteText\\\":\\\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostr\\\",\\\"NoteDate\\\":\\\"1/10/2011\\\",\\\"NoteTime\\\":\\\"12:54 PM\\\"},{\\\"NoteID\\\":14204,\\\"NoteText\\\":\\\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostr\\\",\\\"NoteDate\\\":\\\"1/10/2011\\\",\\\"NoteTime\\\":\\\"1:24 PM\\\"}]\",\"LCustom\":\"0\",\"LContact\":\"[{\\\"ContactID\\\":8758,\\\"ContactSort\\\":1,\\\"ContactFirst\\\":\\\"STEVEN\\\",\\\"ContactMiddle\\\":\\\"\\\",\\\"ContactLast\\\":\\\"GARCIA\\\",\\\"ContactFirstLast\\\":\\\"STEVEN GARCIA\\\",\\\"ContactEmail\\\":\\\"steven@garcia.com\\\"},{\\\"ContactID\\\":8759,\\\"ContactSort\\\":2,\\\"ContactFirst\\\":\\\"EDWARD\\\",\\\"ContactMiddle\\\":\\\"\\\",\\\"ContactLast\\\":\\\"MARTINEZ\\\",\\\"ContactFirstLast\\\":\\\"EDWARD MARTINEZ\\\",\\\"ContactEmail\\\":\\\"edward@martinez.com\\\"},{\\\"ContactID\\\":8760,\\\"ContactSort\\\":3,\\\"ContactFirst\\\":\\\"BRIAN\\\",\\\"ContactMiddle\\\":\\\"\\\",\\\"ContactLast\\\":\\\"ROBINSON\\\",\\\"ContactFirstLast\\\":\\\"BRIAN ROBINSON\\\",\\\"ContactEmail\\\":\\\"brian@robinson.com\\\"}]\",\"LAddress\":\"[{\\\"AddressID\\\":14293,\\\"AddressSort\\\":1,\\\"AddressLabel\\\":\\\"Primary Address\\\",\\\"Address1\\\":\\\"1305 S 1st St\\\",\\\"Address2\\\":\\\"Suite 3\\\",\\\"AddressCity\\\":\\\"San Jose\\\",\\\"AddressState\\\":\\\"CA\\\",\\\"AddressZip\\\":\\\"95008\\\",\\\"AddressCounty\\\":\\\"Santa Clara\\\",\\\"AddressCountry\\\":\\\"USA\\\"}]\",\"LBiz\":\"0\",\"LPhone\":\"0\",\"LStatusH\":\"[{\\\"NewStatus\\\":2,\\\"StatusDate\\\":\\\"4/09/2011\\\"},{\\\"NewStatus\\\":3,\\\"StatusDate\\\":\\\"4/14/2011\\\"},{\\\"NewStatus\\\":2,\\\"StatusDate\\\":\\\"4/19/2011\\\"}]\",\"LEmail\":\"0\",\"LCall\":\"[{\\\"CallDate\\\":\\\"5:54 AM\\\",\\\"CallTime\\\":\\\"5/20/2011\\\",\\\"CallDuration\\\":5457,\\\"CallOutcome\\\":1,\\\"CallPhonePrefix\\\":1,\\\"CallPhoneNumber\\\":\\\"4084840241\\\"},{\\\"CallDate\\\":\\\"5:24 AM\\\",\\\"CallTime\\\":\\\"5/23/2011\\\",\\\"CallDuration\\\":11,\\\"CallOutcome\\\":4,\\\"CallPhonePrefix\\\":1,\\\"CallPhoneNumber\\\":\\\"4084840241\\\"}]\"}"},{"ObjectID":1496,

Thanks.

  • 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-23T04:08:39+00:00Added an answer on May 23, 2026 at 4:08 am

    You just need to serialize the instance of MyObject. Serializer will automatically serialize the inner lists accordingly.

    If you need to ignore any property use the [ScriptIgnore] atribute like russau suggested.

    eg.

    public class MySubObject
    {
     // The JavaScriptSerializer ignores this field.
            [ScriptIgnore]
            public int useID { get; set; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have a domain object that looks like this: @Entity @Indexed public
I have a MyClassFile.cs file that looks like this: public class MyClass1 { public
I have a ViewModel that looks like this: public class CreateReviewViewModel { public string
Hi, I have a action that looks like this : [AcceptVerbs(HttpVerbs.Post)] public ActionResult Register(AdRegister
I have an object tree that looks something like Ball / \ LegalBall IllegalBall
I have an object that has a list of abstract 'aninamls'. i.e. var animals
I have an object that is generated in one class public class CreatingClass {
I have an object that is mapped to have a set of objects, very
I have a class member in an ActionScript 3 class that looks something like
I have an object that is mapped to a cookie as a serialized base-64

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.