public void TryToDecodeAll() { triedToDecodeAll = true; var str = json.AsJsonString; if (str != null) { str.dataOnly = false; var sb = new StringBuilder(); int index = 0; while (index < str.data.Length && (str.data[index] != '{')) { sb.Append(str.data[index]); index++; } jsonDestination = sb.ToString(); str.data = str.data.Substring(index); } do { } while (json.DecodeAll(ref json)); }
public void TryToDecodeAll() { triedToDecodeAll = true; var rootAsString = rootJson.AsJsonString; if (rootAsString != null && !rootAsString.data.IsNullOrEmpty()) { rootAsString.dataOnly = false; var sb = new StringBuilder(); int index = 0; while (index < rootAsString.data.Length && rootAsString.data[index] != '{' && rootAsString.data[index] != '[') { sb.Append(rootAsString.data[index]); index++; } jsonDestination = sb.ToString(); rootAsString.data = rootAsString.data.Substring(index); } do { } while (rootJson.DecodeAll(ref rootJson)); }
public bool Inspect() { if (icon.Delete.Click()) { triedToDecodeAll = false; json = new JsonString(); jsonDestination = ""; } if (!triedToDecodeAll && "Decode All".Click()) { var str = json.AsJsonString; if (str != null) { str.dataOnly = false; var sb = new StringBuilder(); int index = 0; while (index < str.data.Length && str.data[index] != '{') { sb.Append(str.data[index]); index++; } jsonDestination = sb.ToString(); str.data = str.data.Substring(index); } triedToDecodeAll = true; do { } while (json.DecodeAll(ref json)); } if (jsonDestination.Length > 5) { jsonDestination.write(); } return(DecodeOrInspectJson(ref json, true)); }
public override bool DecodeAll(ref JsonBase thisJson) => data.DecodeAll(ref data);