Skip to main content
All docs
V23.2

IJsonSourceCustomizationService Interface

Allows you to specify a new JSON source for a JSON data source at runtime.

Namespace: DevExpress.DataAccess.Json

Assembly: DevExpress.DataAccess.v23.2.dll

NuGet Packages: DevExpress.DataAccess, DevExpress.Win.PivotGrid, DevExpress.Win.TreeMap

Declaration

public interface IJsonSourceCustomizationService

Remarks

DevExpress Reporting

If the JSON data source is already registered in the End-User Report Designer, you cannot change the JsonSource data source property to load data from another endpoint. This is because the data may already be loaded and cached. To specify a new JSON source, implement the IJsonSourceCustomizationService interface, as the following code snippet shows:

using DevExpress.DataAccess.Json;
using DevExpress.XtraPrinting.Native;
// ...
XtraReport1 report = new XtraReport1();
report.ReplaceService<IJsonSourceCustomizationService>(new MyJsonCustomizationService()); 
report.CreateDocument();
// ...
public class MyJsonCustomizationService : IJsonSourceCustomizationService  
{  
    public JsonSourceBase CustomizeJsonSource(JsonDataSource jsonDataSource)  
    {  
        return new DevExpress.DataAccess.Json.UriJsonSource("https://northwind.netcore.io/customers.json"));  
    }  
}  

For more information, review the following help topic: Data Sources in Web End-User Report Designer (ASP.NET Core).

See Also