Example #1
0
        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));
            }
        }
Example #2
0
 public Utf8String GetUtf8String()
 {
     return(JsonString.Unquote(Segment));
 }
Example #3
0
 public String GetString()
 {
     return(JsonString.Unquote(Segment.ToString()));
 }