Add JSON dumping and loading for models and collections