Added to json function to model base class