JsonFormatProvider
A workbook format provider that exports spreadsheet content to a structured JSON representation. This provider is export-only; importing JSON back into a workbook is not supported.
Definition
Namespace:Telerik.Windows.Documents.Spreadsheet.FormatProviders.Json
Assembly:Telerik.Windows.Documents.Spreadsheet.FormatProviders.Json.dll
Syntax:
public class JsonFormatProvider : BinaryWorkbookFormatProviderBase, IBinaryWorkbookFormatProvider, IWorkbookFormatProvider
Inheritance: objectWorkbookFormatProviderBaseBinaryWorkbookFormatProviderBaseJsonFormatProvider
Implements:
Inherited Members
Constructors
Initializes a new instance of the JsonFormatProvider class with default JsonExportSettings.
public JsonFormatProvider()
Methods
Performs the export operation writing a JSON representation of workbook into output.
protected override void ExportOverride(Workbook workbook, Stream output, CancellationToken cancellationToken)
The workbook to export.
outputStreamThe destination stream (must be writable).
cancellationTokenCancellationTokenToken used to observe cancellation requests.
Exceptions:Thrown if workbook or output is null.
Overrides:
Import with cancellation is not supported and always throws NotSupportedException.
protected override Workbook ImportOverride(Stream input, CancellationToken cancellationToken)
The input stream.
cancellationTokenCancellationTokenCancellation token (ignored).
Returns:Never returns; always throws.
Overrides:
Properties
Gets a value indicating whether export is supported (always true).
public override bool CanExport { get; }
Overrides:
Gets a value indicating whether import is supported (always false for this provider).
public override bool CanImport { get; }
Overrides:
Gets or sets the export settings controlling JSON output. If null at export time, defaults are applied.
public JsonExportSettings ExportSettings { get; set; }
Gets a human-readable description of the file type handled by this provider.
public override string FilesDescription { get; }
Overrides:
Gets the set of supported file extensions (currently only ".json").
public override IEnumerable<string> SupportedExtensions { get; }
Overrides: