private static string Write( bool indent, bool produceAscii, Action<JsonWriter> action )
        {
            var sw = new StringWriter();
            using( var writer = new JsonWriter(sw, indent, produceAscii) )
            {
                action(writer);

                sw.Flush();
                return sw.ToString();
            }
        }
        private static string Write( CsvFormat csvFormat, Action<CsvWriter> action )
        {
            var sw = new StringWriter();
            using( var writer = new CsvWriter(sw, csvFormat) )
            {
                action(writer);

                sw.Flush();
                return sw.ToString();
            }
        }