I created a WCF REST service that returns JSON, but the properties in serialized objects are returned in alphabetical order.
Is it possible to change this?
Try setting the order property on your data elements for your data contracts:
[DataContract] public class MyClass { [DataMember(IsRequired = true, Order = 1)] public int Id { get; set; } }
Source: https://habr.com/ru/post/1763823/More articles:In Git, can I see all commits from branch merges? - gitHow to move old content in the ranking of search engines? - searchHelp creating a hash from a hash map - javaGoogle PageRank: does it count per domain or web page - pagerankHow to get the whole function in the range from a GFF3 file in Perl? - perlHow to add CSS code inside if ... else if ... else Javascript statement - javascriptNested TreeView with additional properties - wpfMake sure all images are uploaded to `$ (window) .load ()` before continuing - jqueryJSF with Cocoon - javaSIP soft phone in java - javaAll Articles