Active3 years, 1 month ago
Jan 07, 2017 I need to pass the dataset to WCF service which will receive dataset object as an input. So I need to serialize Dataset which have multiple named DataTables (around 14 datatables) to JSON using JavaScriptSerializer. How to use newtonsoft JSON to serialize and deserialize in asp.net using c#, vb.net with example or Use newtonsoft.json for JSON serialization and deserialization in asp.net using c#, vb.net with example or serializing / deserializing JSON data in asp.net using c#, vb.net with example. Using any one of the preceding methods will serialize a.NET DataTable to a JSON String in C#. First we will get records from the database (Microsoft SQL Server) into a DataTable or we can also add dynamic rows to our DataTable. Serializes a DataSet to JSON on. The issue is due to the serializer don't use the DataSetConverter in netcore 2.0 (the current support of json.net v10.0.3 is.
Free Acapella Downloads for personal education, non-monetized, non-profit use (need to be licensed for commercial use) + Royalty Free Sample Packs and Custom Vocal Recordings! Professionally Recorded, Studio Quality WAV files. Free download acapella 140 bpm. The best acapella, vocals voice a capella, songs, rapping, singing. Male & female voices at various bpms. FREE downloads.
My scenario is like this. I've a dataset that has 2 tables inside and 1st table has rows but the 2nd table has empty that meaning that it has no records. When i serialized it using newtonsoft.json, it serialized the 1st table data only but i need 2nd table also with empty values meaning that so that i can deserialize this to another dataset so that it can have 2 tables with 1 table with data and another table with no data. This is done in C#Code is below
Here is the json value :
and this is not having any data about table 2.
Newtonsoft Serialize Datatable To Json
Mark2,61822 gold badges3131 silver badges4949 bronze badges
user6511101user6511101
1 Answer
used newtonsoft.json and its serializing and deserializing the datasets even with empty datatables as needed.Thnx for ur support
user6511101user6511101