/// <summary> /// Render a JSONValue as a string. /// </summary> /// <param name="value">the IJSONValue to render</param> /// <param name="pretty">'true' to pretty-print with line feeds and indentation, 'false' /// to render on a single line.</param> /// <returns>the rendered value</returns> static public string ToString(IJSONValue value, bool pretty) { string str; using (StringWriter writer = new StringWriter()) { value.Write("", writer, pretty); str = writer.ToString(); } return(str); }