encodeToMap

Encodes properties from given value to a map using serializer for reified type T and returns this map. null values are omitted from the output.