Dos.Common.JSONSerializer.WriteDataTableData(System.Data.DataTable)

Here are the examples of the csharp api class Dos.Common.JSONSerializer.WriteDataTableData(System.Data.DataTable) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: Dos.Common
Source File: JsonSerializer.cs
private void WriteDataset(DataSet ds)
        {
            _output.Append('{');
            if (_params.UseExtensions)
            {
                WritePair("$schema", _params.UseOptimizedDatasetSchema ? (object)GetSchema(ds) : ds.GetXmlSchema());
                _output.Append(',');
            }
            bool tablesep = false;
            foreach (DataTable table in ds.Tables)
            {
                if (tablesep) _output.Append(',');
                tablesep = true;
                WriteDataTableData(table);
            }
            // end dataset
            _output.Append('}');
        }

2. Example

Project: Dos.Common
Source File: JsonSerializer.cs
void WriteDataTable(DataTable dt)// biy itdos.com
        {
            if (!_params.DataTableToGeneralJson)
            {
                this._output.Append('{');
            }
            if (_params.UseExtensions)
            {
                this.WritePair("$schema", _params.UseOptimizedDatasetSchema ? (object)this.GetSchema(dt) : this.GetXmlSchema(dt));
                this._output.Append(',');
            }

            WriteDataTableData(dt);

            // end datatable
            if (!_params.DataTableToGeneralJson)// biy itdos.com
            {
                this._output.Append('}');
            }
        }