Example #1
0
        public static TCLinkResponse DeserializeLinkResponse(string theJSON)
        {
            TCLinkResponse theResponse = null;

            try
            {
                theResponse = JsonConvert.DeserializeObject <TCLinkResponse>(theJSON);
            }
            catch (Exception xcp)
            {
                System.Diagnostics.Debug.WriteLine(xcp.Message);
            }
            return(theResponse);
        }
Example #2
0
        public static void Show(string fname, string json, List <string> highlights = null)
        {
            TCLinkResponse response = Helper.DeserializeLinkResponse(json);

            json = response == null ? json : Helper.Stringify(response);
            if (json.IndexOf("{") == 0)
            {
                json = RemoveCardWorkflowControls(json);
            }
            messageBox = new JsonMessageBox();
            messageBox.SetLabel(fname);
            messageBox.SetContents(json);
            Highlight(messageBox.richTextBox1, highlights);
            messageBox.Show();
        }