CFCParcel* CFCParcel_new_from_file(const char *path) { size_t len; char *json = CFCUtil_slurp_text(path, &len); CFCParcel *self = S_new_from_json(json, path); FREEMEM(json); return self; }
CFCParcel* CFCParcel_new_from_file(CFCFileSpec *file_spec) { const char *path = CFCFileSpec_get_path(file_spec); size_t len; char *json = CFCUtil_slurp_text(path, &len); CFCParcel *self = S_new_from_json(json, file_spec); FREEMEM(json); return self; }
CFCParcel* CFCParcel_new_from_json(const char *json) { return S_new_from_json(json, "[NULL]"); }
CFCParcel* CFCParcel_new_from_json(const char *json, CFCFileSpec *file_spec) { return S_new_from_json(json, file_spec); }