public static new JSONString Parse(Token token) { StringBuilder builder = new StringBuilder(); token.MoveToContent(); if (!token.Peeks("\"")) { return null; } token.MovePast("\""); while (!token.Peeks("\"")) { if (token.Peeks("\\\"")) { builder.Append("\""); token.Skip(2); } else { builder.Append(token.Current); token.Skip(1); } } token.MovePast("\""); return new JSONString(builder.ToString()); }
public static new JSONBoolean Parse(Token token) { token.MoveToContent(); if (token.Peeks("true")) { token.Skip("true"); return new JSONBoolean(true); } if (token.Peeks("false")) { token.Skip("false"); return new JSONBoolean(false); } return null; }
// Methods public static new JSONNull Parse(Token token) { token.MoveToContent(); if (token.Peeks("null")) { token.Skip(4); return JSONValue.Null; } return null; }
public HtmlComment(Token token) { token.Skip("<!--"); Value = token.ReadUntil("-->").Trim(); token.Skip("-->"); }