Exemplo n.º 1
0
        public static string ToJSONSimple(EntityCollection collection, Formatting format)
        {
            var rootDictionary = new Dictionary <string, object>
            {
                ["value"] = collection.Entities.Select(e => EntitySerializer.ToJSONSimpleObject(e)).ToArray()
            };

            return(Newtonsoft.Json.JsonConvert.SerializeObject(rootDictionary, format == Formatting.Indented ? Newtonsoft.Json.Formatting.Indented : Newtonsoft.Json.Formatting.None));
        }