public class JSONBackendProtocol extends JSONProtocol implements Protocol {
@Override
public byte[] encode(Record record, Configuration configuration)
throws ProtocolCodingException, NoSuchDomainException {
Request request = new Request();
request.name = record.getName().getLabelString(0);
request.moniker = configuration.monikerFromName(new Name(record.getName(), 1));
try {
return this.mapper.writeValueAsBytes(request);