add option to serialize to dicts with member names