core: added xavu_serialize_fields function (#2603)