Configures whether to preserve empty objects "{}" or to convert them to null.
public function withPreservedEmptyObjects(?bool $preserveEmptyObjects) : static { return $this->with(YamlEncoder::PRESERVE_EMPTY_OBJECTS, $preserveEmptyObjects); }