Back to Devexpress

JsonSourceConnectionParameters.JsonSource Property

dashboard-devexpress-dot-dashboardcommon-dot-jsonsourceconnectionparameters.md

latest7.4 KB
Original Source

JsonSourceConnectionParameters.JsonSource Property

Gets or sets a JSON source.

Namespace : DevExpress.DashboardCommon

Assembly : DevExpress.Dashboard.v25.2.Core.dll

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
public JsonSourceBase JsonSource { get; set; }
vb
Public Property JsonSource As JsonSourceBase

Property Value

TypeDescription
JsonSourceBase

A JsonSourceBase descendants that defines a JSON source.

|

Remarks

The JsonSource property returns the CustomJsonSource or UriJsonSource objects that defines a JSON source.

The following code snippets (auto-collected from DevExpress Examples) contain references to the JsonSource property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

dashboard-blazor-webassembly-configuration/CS/BlazorDashboardApp/BlazorDashboardApp.Server/Code/DashboardUtils.cs#L19

csharp
JsonSourceConnectionParameters jsonParams = new JsonSourceConnectionParameters();
jsonParams.JsonSource = new UriJsonSource(fileUri);
e.ConnectionParameters = jsonParams;

dashboard-blazor-server-js-customization/CS/BlazorDashboardApp/Code/DashboardUtils.cs#L19

csharp
JsonSourceConnectionParameters jsonParams = new JsonSourceConnectionParameters();
jsonParams.JsonSource = new UriJsonSource(fileUri);
e.ConnectionParameters = jsonParams;

asp-net-web-forms-dashboard-register-data-sources/CS/WebFormsDashboardDataSources/Pages/JsonDashboard.aspx.cs#L47

csharp
JsonSourceConnectionParameters jsonParams = new JsonSourceConnectionParameters();
jsonParams.JsonSource = new UriJsonSource(new Uri("https://raw.githubusercontent.com/DevExpress-Examples/DataSources/master/JSON/support.json"));
e.ConnectionParameters = jsonParams;

dashboard-blazor-server-configuration/CS/BlazorDashboardApp/Code/DashboardUtils.cs#L19

csharp
JsonSourceConnectionParameters jsonParams = new JsonSourceConnectionParameters();
jsonParams.JsonSource = new UriJsonSource(fileUri);
e.ConnectionParameters = jsonParams;

mvc-dashboard-how-to-store-connections-in-database/CS/DXWebApplication26/Storage/ConnectionStringsStorage.cs#L38

csharp
var jsonConnectionParams = new JsonSourceConnectionParameters();
jsonConnectionParams.JsonSource = new UriJsonSource(new Uri("https://raw.githubusercontent.com/DevExpress-Examples/DataSources/master/JSON/customers.json"));
dictionary.Add("Customers_JSON", jsonConnectionParams);

asp-net-web-forms-dashboard-register-data-sources/VB/WebFormsDashboardDataSources/Pages/JsonDashboard.aspx.vb#L43

vb
Dim jsonParams As JsonSourceConnectionParameters = New JsonSourceConnectionParameters()
jsonParams.JsonSource = New UriJsonSource(New Uri("https://raw.githubusercontent.com/DevExpress-Examples/DataSources/master/JSON/support.json"))
e.ConnectionParameters = jsonParams

mvc-dashboard-how-to-store-connections-in-database/VB/DXWebApplication26/Storage/ConnectionStringsStorage.vb#L42

vb
Dim jsonConnectionParams = New JsonSourceConnectionParameters()
jsonConnectionParams.JsonSource = New UriJsonSource(New Uri("https://raw.githubusercontent.com/DevExpress-Examples/DataSources/master/JSON/customers.json"))
dictionary.Add("Customers_JSON", jsonConnectionParams)

web-dashboard-how-to-store-json-connections-in-database/VB/DXWebApplication21/ConnectionStringsStorage.vb#L43

vb
Dim jsonConnectionParams = New JsonSourceConnectionParameters()
jsonConnectionParams.JsonSource = New UriJsonSource(New Uri("https://raw.githubusercontent.com/DevExpress-Examples/DataSources/master/JSON/customers.json"))
dictionary.Add("Customers_JSON", jsonConnectionParams)

aspnet-mvc-dashboard-data-federation/VB/MVC_DataFederationExample/App_Start/DashboardConfig.vb#L64

vb
ElseIf e.ConnectionName = "jsonCategories" Then
    Dim uriSource As UriJsonSource = TryCast((TryCast(e.ConnectionParameters, JsonSourceConnectionParameters)).JsonSource, UriJsonSource)
    uriSource.Uri = New Uri(HostingEnvironment.MapPath("~/App_Data/Categories.json"), UriKind.RelativeOrAbsolute)

asp-net-mvc-dashboard-register-data-sources/VB/MvcDashboardDataSources/Configuration/JsonDataSourceConfigurator.vb#L38

vb
Dim jsonParams As New JsonSourceConnectionParameters()
jsonParams.JsonSource = New UriJsonSource(fileUri)
e.ConnectionParameters = jsonParams

See Also

JsonSourceConnectionParameters Class

JsonSourceConnectionParameters Members

DevExpress.DashboardCommon Namespace