Implemented json loading.