Beispiel #1
0
 public void Print(IPrintContext context)
 {
     if (context.Format == PrintFormat.YAML || !mightNeedQuoting)
     {
         context.Write(value);
     }
     else
     {
         context.WriteQuoted(value);
     }
 }
Beispiel #2
0
        private void PrintJson(IPrintContext context)
        {
            context.WriteQuoted(Name);
            context.Write(": ");

            if (value is ObjectToken || value is SequenceToken)
            {
                context.WriteLine();
            }

            value.Print(context);
        }