encodeToParameters
Serializes this into FormParameters, to be transmitted as a URL query or a POST body.
Members that are not JSON primitives (objects and arrays, e.g. dcql_query) are serialized to their compact JSON representation, which is what OpenID4VP and OpenID4VCI prescribe for those parameters.
Throws
SerializationException
if this does not serialize to a JSON object or array, i.e. if it is a literal
Variant of encodeToParameters taking an explicit serializer, for use without reified type information.