private void JsonValidationTimerHandler(IJsonTreeNode node) { jsonTreeView.BeginUpdate(); try { var newNode = node.AfterJsonTextChange(jsonValueEditor.Text); if (newNode != null) { jsonTreeView.SelectedNode = newNode; SetJsonStatus("Json format validated.", false); } else { SetJsonStatus("INVALID Json format", true); } } catch (JsonReaderException exception) { SetJsonStatus( $"INVALID Json format at (line {exception.LineNumber}, position {exception.LinePosition})", true); } catch { SetJsonStatus("INVALID Json format", true); } jsonTreeView.EndUpdate(); }
private void JsonValidationTimerHandler(IJsonTreeNode node) { jsonTreeView.BeginUpdate(); try { jsonTreeView.SelectedNode = node.AfterJsonTextChange(jsonValueTextBox.Text); SetJsonStatus("Json format validated.", false); } catch (JsonReaderException exception) { SetJsonStatus( String.Format("INVALID Json format at (line {0}, position {1})", exception.LineNumber, exception.LinePosition), true); } catch { SetJsonStatus("INVALID Json format", true); } jsonTreeView.EndUpdate(); }