コード例 #1
0
        public string Get(string searchString)
        {
            ResultObject resultt = new ResultObject();

            try
            {
                var result = services.Search(searchString).ToList();
                return(JsonConvert.SerializeObject(result, Formatting.Indented, new JsonSerializerSettings
                {
                    ReferenceLoopHandling = ReferenceLoopHandling.Ignore
                }));
            }
            catch (Exception e)
            {
                resultt.Message = "EXCEPTION: " + e.Message + "Stack: " + e.StackTrace;
                return(JsonConvert.SerializeObject(resultt));
            }
        }