function JSONLoader () {

    function load ( controller, data ) {

        if ( data === undefined || data === null ) {

            data = [];

        }

        controller.inputData = JSON.parse( JSON.stringify( data ) );

    }

    return {

        load: load

    }

}
This is a JSON loader which can load JSON data into the controller