/// <summary>
        /// Serializes the specified list into a JSON string.
        /// </summary>
        /// <param name="model">The <see cref="List&lt;T&gt;"/> to serialize.</param>
        /// <param name="meta">The ODATA metadata string to include in the serialized object.</param>
        /// <returns>A JSON <see cref="string"/> that contains the serialized list.</returns>
        protected virtual string ListToJson(List <T> model, string meta)
        {
            // serialize the object to xml string.
            var odmodel = new ODataList <T>()
            {
                Value = model.ToArray(), Metadata = meta
            };

            return(_odserializer.SerializeObject(odmodel));
        }
        /// <summary>
        /// Serializes the specified list into a JSON string.
        /// </summary>
        /// <param name="model">The <see cref="List&lt;T&gt;"/> to serialize.</param>
        /// <param name="meta">The ODATA metadata string to include in the serialized object.</param>
        /// <returns>A JSON <see cref="string"/> that contains the serialized list.</returns>
        protected virtual string ListToJson(List <T> model, string meta)
        {
            string json = null;

            // serialize the object to xml string.
            var odmodel = new ODataList <T> {
                Value = model.ToArray(), Metadata = meta
            };

            var settings = new JsonSerializerSettings();

            settings.Converters.Add(new IsoDateTimeConverter());
            using (TextWriter writer = new StringWriter())
            {
                JsonSerializer.Create(settings).Serialize(writer, odmodel);
                json = writer.ToString();
            }
            return(json);
        }