of

open fun <T> of(nameExtractor: (T) -> out Any, valueExtractor: (T) -> out Any): JsonWriter.PairExtractor<T>

Factory method to create a PairExtractor using distinct name and value extraction functions.

Return

a new PairExtractor instance

Parameters

<T>

the element type

nameExtractor

the name extractor

valueExtractor

the value extraction