toDynamicDto
Helper method to manually serialize a domain object into a DynamicDto.
By default, it uses the database's internal Json configuration, which guarantees that specific types (like PostgreSQL enums, BigDecimals, or infinity dates) are serialized correctly. The object must be annotated with @DynamicallyMappable and @Serializable.
Return
A constructed DynamicDto ready to be passed to queries.
Parameters
value
The domain object to serialize.
json
Optional custom JSON configuration to use instead of the database's default DataAccess.json.