Changed to accept JSON configuration