Added support for loading custom models with .json format too.