* @param inputOp document operation to serialize
* @return serialized protocol buffer document operation
*/
public static ProtocolDocumentOperation serialize(DocOp inputOp) {
final ProtocolDocumentOperation output = ProtocolDocumentOperationJsoImpl.create();
inputOp.apply(new DocOpCursor() {
private Component addComponent() {
ComponentJsoImpl component = ComponentJsoImpl.create();
output.addComponent(component);
return component;