public void QuoteTest() { { var value = Utf8String.From("ho5日本語ge"); var quoted = Utf8String.From("\"ho5日本語ge\""); Assert.AreEqual(quoted, JsonString.Quote(value)); Assert.AreEqual(value, JsonString.Unquote(quoted)); } { var value = Utf8String.From("fuga\n ho5日本語ge"); var quoted = Utf8String.From("\"fuga\\n ho5日本語ge\""); Assert.AreEqual(quoted, JsonString.Quote(value)); Assert.AreEqual(value, JsonString.Unquote(quoted)); } }
public Utf8String GetUtf8String() { return(JsonString.Unquote(Segment)); }
public String GetString() { return(JsonString.Unquote(Segment.ToString())); }