List values = (from ObjType ot in TableObj orderby ot.Key select ot.Value).ToList() ĭictionary existingItems = new Dictionary(keys. JSON to XML converter is a web-based tool that allows you to convert your lengthy and complex JSON code into readable XML format. Converting between JSON and XML Json.NET supports converting JSON to XML and vice versa using the XmlNodeConverter. I also considered the following code, but I was trying to find a proper way: List keys = (from ObjType ot in TableObj orderby ot.Key select ot.Key).ToList() What I'd like to have at the end would be a Dictionary, without having to download the whole ObjectType objects from TableObject. Select (new KeyValuePair(ot.Key, ot.TimeStamp)) You can use the DataContractJsonSerializer when you are able to express the xml in a datacontract. Anyone have an idea? Dictionary existingItems = I was thinking of doing something like this, but obviously, it doesn't work. However, several third-party libraries are available for conversion. To do this, I want to fetch as little information as required for the validation, and only once at the beginning of the process. Java community didnt provide any capability to convert XML to JSON in standard JDK. I'd like to keep the trafic between the client and the DB server as low as possible and minimize the number of queries. Solution 1: You can always convert your XML, Thats because theres no standard way to convert XML to JSON theyre not exactly directly compatible, For. I want to add some rows to a database using Linq to SQL, but I want to make a "custom check" before adding the rows to know if I must add, replace or ignore the incomming rows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |