corelibraries-devexpress-dot-dataaccess-dot-json-dot-urijsonsource-bb066994.md
Provides access to a collection of parameters that the UriJsonSource passes to a JSON endpoint as HTTP request parameters.
Namespace : DevExpress.DataAccess.Json
Assembly : DevExpress.DataAccess.v25.2.dll
NuGet Package : DevExpress.DataAccess
[Browsable(false)]
public QueryParameterCollection QueryParameters { get; }
<Browsable(False)>
Public ReadOnly Property QueryParameters As QueryParameterCollection
| Type | Description |
|---|---|
| QueryParameterCollection |
Lists query parameters.
|
This property stores a collection of query parameters that the UriJsonSource appends to a JSON endpoint’s Uri.
The parameters are added to endpoint requests in the same order in which they are stored in the collection. Change the order of elements in the collection to reposition parameters in endpoint requests.
public static JsonDataSource CreateDataSourceWithAuthenticationInCode() {
// Create a new UriJsonSource object and configure authentication data in it
var jsonSource = new DevExpress.DataAccess.Json.UriJsonSource();
jsonSource.Uri = new Uri(@"https://northwind.netcore.io/customers.json");
jsonSource.QueryParameters.Add(new QueryParameter("id", "123456"));
jsonSource.QueryParameters.Add(new QueryParameter("name", "MyName"));
// Create JsonDataSource
var jsonDataSource = new DevExpress.DataAccess.Json.JsonDataSource() {
JsonSource = jsonSource
};
jsonDataSource.Fill();
}
Public Shared Function CreateDataSourceWithAuthenticationInCode() As JsonDataSource
' Create a new UriJsonSource object and configure authentication data in it
Dim jsonSource = New DevExpress.DataAccess.Json.UriJsonSource()
jsonSource.Uri = New Uri("https://northwind.netcore.io/customers.json")
jsonSource.QueryParameters.Add([New] QueryParameter("id", "123456"))
jsonSource.QueryParameters.Add([New] QueryParameter("name", "MyName"))
' Create JsonDataSource
Dim jsonDataSource = New DevExpress.DataAccess.Json.JsonDataSource() With {.JsonSource = jsonSource}
jsonDataSource.Fill()
End Function
See Also