1

Closed

Convert DataTable to Json String Issue

description

Hi James,
 
I am using Newton.Json to convert the DataTable in Json String, as mentioned below. But my Json string is coming with "\". How can i remove this char "\".
 
Appreciate your help its very urgent for me.
 
C# Code to convert DataTable to Json String.
string json = JsonConvert.SerializeObject(objAcctDTable, Formatting.None);
 
Json OutPut String:
"[{\"AcctID\":5822,\"AcctName\":\"1 EDI SOURCE INC (Vendor)\"},{\"AcctID\":4350,\"AcctName\":\"21C OATS, INC. (Rail Customer)\"},{\"AcctID\":5729,\"AcctName\":\"24 Waterway LLC (Leasing Company Account)\"},{\"AcctID\":3799,\"AcctName\":\"3D CORPORATE SOLUTIONS LLC (Rail Customer)\"},{\"AcctID\":4596,\"AcctName\":\"3FNP (HINES 70 WEST MADISON LP) (Vendor)\"},{\"AcctID\":6035,\"AcctName\":\"3FNP LLC (Oracle Vendor)\"},{\"AcctID\":4622,\"AcctName\":\"3M CO (Vendor)\"},{\"AcctID\":4532,\"AcctName\":\"3M COMPANY (Oracle Customer)\"},{\"AcctID\":5912,\"AcctName\":\"5th3rd, BCC (Leasing Company Account)\"},{\"AcctID\":5913,\"AcctName\":\"5th3rd, UBOC, FNBC (Leasing Company Account)\"},{\"AcctID\":5730,\"AcctName\":\"8121 Broadway Interests, LLC (Leasing Company Account)\"},{\"AcctID\":3324,\"AcctName\":\"A E STALEY MFG. (Mileage Tax Customer)\"}]"
Closed Jul 25, 2012 at 6:28 AM by JamesNK
Something else is doing that.

comments