Create Json record - CSharp Newtonsoft.Json

CSharp examples for Newtonsoft.Json:Json Record

Description

Create Json record

Demo Code


using Newtonsoft.Json;

public class Main{
        public static string GetPartialDeleteBulk(string index, string type, object id, object value = null, object parent = null)
        {/*from w  ww  . j  av  a  2s . co  m*/
            return string.Format("{0}\n",
                JsonConvert.SerializeObject(new { delete = new { _index = index, _type = type, _id = id } }, Formatting.None));
        }
}

Related Tutorials