private ActivityResource activityFromObject(object obj) { return(ActivityResource.FromJson(Json.Encode(obj))); }