All docs
V20.1
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

JsonDataSource.SchemaDiscoveryMaxItemCount Property

Specifies how many data source elements to analyze on each level to build the schema.

Namespace: DevExpress.DataAccess.Json

Assembly: DevExpress.DataAccess.v20.1.dll

Declaration

[DefaultValue(100)]
[LocalizableCategory(DataAccessStringId.PropertyGridDataCategoryName)]
public int SchemaDiscoveryMaxItemCount { get; set; }
<DefaultValue(100)>
<LocalizableCategory(DataAccessStringId.PropertyGridDataCategoryName)>
Public Property SchemaDiscoveryMaxItemCount As Integer

Property Value

Type Default Description
Int32

100

The number of data source elements to analyze on each level to build the schema.

Remarks

Use this property to limit the number of data source records that the JsonDataSource uses to build the schema. This improves the performance on data sources with a large number of records.

Set this property to 0 to analyze all data source records.

If a record contains an array of nested records, the same limit applies to the nested records to build their schema.

This property is not in effect if the Schema property has a value different from null (Nothing in Visual Basic) before you call the Fill() method.

Example

The code sample below creates a new JSON data source and uses the first 5 records to build the schema.

using DevExpress.DataAccess;
using DevExpress.DataAccess.Json;
// ...
// Create a new JSON source.
var jsonSource = new UriJsonSource() {
    Uri = new Uri(@"https://raw.githubusercontent.com/DevExpress-Examples/DataSources/master/JSON/customers.json")
};
// Assign the JSON source to the data source. Use the first 5 records to build the schema.
var datasource = new JsonDataSource() {
    JsonSource = jsonSource,
    SchemaDiscoveryMaxItemCount = 5
};
See Also