Make base models json serializable.