encodeToMap

Encodes properties from the given value to a map using the given serializer. null values are omitted from the output.