JsonConvert.SerializeObject Removing of \"

Jun 19, 2012 at 2:51 AM

Hi,

I am using JsonConvert.SerializeObject to serialise an object but when it is return it's passed back to the browser, the " values have been escaped. see below.

Any ideas?

"{\"Data\":[{\"Area1\":{\"Asset\":[],\"AssetHistory\":[],\"Issue\":[],\"IdentityDescription\":\"Cinema 1\",\"Id\":1,\"AreaName\":\"Cinema 1\",\"IsAll\":false},\"Site1\":{\"Company1\":null,\"StateLookup\":{\"Contact\":[],\"IVRStateRule\":[],\"IVRStateRule1\":[],\"IdentityDescription\":\"NSW\",\"Id\":1,\"Code\":\"NSW\",\"MinSupport\":1},\"Area\":[{\"Asset\":[],\"AssetHistory\":[],\"Issue\":[],\"IdentityDescription\":\"Cinema 1\",\"Id\":1,\"AreaName\":\"Cinema 1\",\"IsAll\":false}],\"Asset\":[],\"Issue\":[],\"UserJobRole\":[],\"IdentityDescription\":\"BAN\",\"Id\":1,\"Code\":\"BAN\",\"SiteName\":\"Bankstow\",\"Hidden\":false},\"TicketStatus\":{\"EmailJobRoleStatus\":[],\"TicketHistory\":[],\"TicketStatusRule\":[],\"IdentityDescription\":\"\",\"Id\":2,\"Icon\":null},\"User\":null,\"File\":[],\"IVRJob\":[],\"TicketHistory\":[],\"IdentityDescription\":\"Paul Phillips\",\"Id\":2,\"LodgedBy\":\"Paul Phillips\",\"ContactNumber\":\"asd\",\"ContactName\":\"asdas\",\"Priority\":2,\"Description\":\"asd\",\"Info\":\"asdasdasdasdasds\",\"HeatRef\":null,\"AcceptedDate\":null,\"CreatedDate\":\"2012-06-15T12:29:05\",\"IgnoreIVR\":false},{\"Area1\":{\"Asset\":[],\"AssetHistory\":[],\"Issue\":[],\"IdentityDescription\":\"Cinema 1\",\"Id\":1,\"AreaName\":\"Cinema 1\",\"IsAll\":false},\"Site1\":{\"Company1\":null,\"StateLookup\":{\"Contact\":[],\"IVRStateRule\":[],\"IVRStateRule1\":[],\"IdentityDescription\":\"NSW\",\"Id\":1,\"Code\":\"NSW\",\"MinSupport\":1},\"Area\":[{\"Asset\":[],\"AssetHistory\":[],\"Issue\":[],\"IdentityDescription\":\"Cinema 1\",\"Id\":1,\"AreaName\":\"Cinema 1\",\"IsAll\":false}],\"Asset\":[],\"Issue\":[],\"UserJobRole\":[],\"IdentityDescription\":\"BAN\",\"Id\":1,\"Code\":\"BAN\",\"SiteName\":\"Bankstow\",\"Hidden\":false},\"TicketStatus\":{\"EmailJobRoleStatus\":[],\"TicketHistory\":[],\"TicketStatusRule\":[],\"IdentityDescription\":\"\",\"Id\":1,\"Icon\":null},\"User\":{\"Department1\":{\"IVRStateRule\":[],\"IdentityDescription\":\"I.T\",\"Id\":1,\"Code\":\"I.T\",\"Department1\":\"I.T\"},\"StateLookup\":{\"Contact\":[],\"IVRStateRule\":[],\"IVRStateRule1\":[],\"IdentityDescription\":\"NSW\",\"Id\":1,\"Code\":\"NSW\",\"MinSupport\":1},\"TitleLookup\":{\"IdentityDescription\":\"1\",\"Id\":1},\"Asset\":[],\"CompanyUser\":[],\"ExhibitorUser\":[],\"Issue\":[],\"RoleUsers\":[],\"TicketHistory\":[],\"UserJobRole\":[],\"UserLeave\":[],\"UserSupportExclusion\":[],\"UserUnavailReport\":[],\"IdentityDescription\":\"Paul\",\"Id\":3,\"FirstName\":\"Paul\",\"LastName\":\"Phillips\",\"DomainName\":\"pphillips\",\"SupportRole\":true,\"OnSupport\":true,\"Active\":true,\"EmailAddress\":\"pphillips@hoyts.com.au\",\"MobileNumber\":\"0415991259\",\"LastTicketAccepted\":null,\"MaxUnAvailableAllowedPerWeek\":1,\"WeekNo\":1,\"AvailForWeek\":0,\"UnAvailableUntil\":\"2012-06-18T20:04:54.693\",\"UserName\":\"pphillips\",\"Password\":\"Australia01!\"},\"File\":[],\"IVRJob\":[],\"TicketHistory\":[],\"IdentityDescription\":\"Paul Phillips\",\"Id\":3,\"LodgedBy\":\"Paul Phillips\",\"ContactNumber\":\"10\",\"ContactName\":\"10\",\"Priority\":1,\"Description\":\"10\",\"Info\":\"10\",\"HeatRef\":null,\"AcceptedDate\":null,\"CreatedDate\":\"2012-06-15T13:00:01.243\",\"IgnoreIVR\":false}],\"Total\":2,\"AggregateResults\":null,\"Errors\":null}"