Make the model_to_dict a bit more robust (support models without a
projection class method), and also fix the inclusion of the json property