[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.JsonError

JsonError Class

Represents the base type for JSON-related errors.

This abstract class provides the common error message information shared by JSON error objects. Concrete subclasses expose additional context for specific JSON processing problems, such as formula errors or data validation errors.

Use this type as a general reference when working with APIs that report JSON import or serialization issues, and use ErrorMessage to retrieve the descriptive error text.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public abstract class JsonError
Public MustInherit Class JsonError
Examples
Workbook sourceWorkbook = new Workbook();
IValidation validation = sourceWorkbook.Worksheets[0].Range["A1:A3"].Validation;
validation.Add(ValidationType.Custom, ValidationAlertStyle.Stop, ValidationOperator.Between, "=A1>0", null);
string json = sourceWorkbook.ToJson().Replace("A1>0", "A1>");
Workbook importedWorkbook = new Workbook();
IList<JsonError> errors = importedWorkbook.FromJson(json);
JsonError error = errors[0];

Properties

Name Description
ErrorMessage

Gets the descriptive message for this JSON error.

Use this property to retrieve the error text associated with a JSON import, deserialization, or serialization issue.