Improve TURF serializer signature for serializing multiple roots.

Description

The method TurfSerializer.serializeDocument(@Nonnull final OutputStream outputStream, @Nonnull Iterable<?> roots) looks good, except that when you try to serialize a collection such as List<>, it automatically thinks you’re serializing multiple roots and not a single root that is a collection. Improve the serialization signatures—maybe something like serializeDocumentRoots() (“from” or “having” or “with roots” maybe) for all the variations that support passing multiple roots.

Environment

None

Activity

Garret Wilson 
September 27, 2022 at 1:53 PM

It’s interesting to note that fundamentally the TURF serializer was made to serialize multiple roots, so the overwhelming majority of methods take multiple roots. Only three methods take a single root—but those seem to be the methods used the most.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created September 21, 2022 at 2:52 PM
Updated November 21, 2022 at 7:59 PM
Resolved September 27, 2022 at 11:48 PM