@override Object toJson() => { 'document': ?document?.toJson(), if (encodingType.isNotDefault) 'encodingType': encodingType.toJson(), };