public <K, V, D> void serialize( @Nonnull Row<K, V, D> row, @Nonnull JacksonSerializer<? super K> keySerializer, @Nonnull JacksonSerializer<? super V> valueSerializer, @Nullable JacksonSerializer<? super D> documentSerializer, @Nonnull JsonGenerator generator ) throws IOException {
generator.writeStartObject();
@Nullable DocId id = row.getId();
if ( id != null ) {
generator.writeStringField( PROPERTY_ID, id.asString() );
}
//The key
generator.writeFieldName( PROPERTY_KEY );
keySerializer.serialize( row.getKey(), generator );