/// <reference path="./sigApi.ApiBase.d.ts" />

declare namespace SigApi {
    interface ApiJsonLoader extends ApiBase {
        /**
         * Loads a json file
         * 
         * @param {string} url The URL to the json file
         * @param {Function} successHandler A function which is called if the file is loaded, it has the data as first parameter
         * 
         * function ({`any`: `any`})
         * @param {Function} errorHandler A function which is called if the file could not be loaded or an error occures in the success handler
         * 
         * It has an errorcode or an Exception Object as the first parameter
         * 
         * function (`string`)
         */
        getJSON(
            url: string,
            successHandler: (data: any) => void,
            errorHandler: (error: number) => void
        ): void
    }
}
