anchor.diff:  start_link() ->
     gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
   
  -%% @doc Encode a Zone record into JSON.
  +%% @doc Encode a Zone meta data into JSON.
  +-spec zone_meta_to_json(#zone{}) -> binary().
  +zone_meta_to_json(Zone) ->
  +  jsx:encode([{<<"erldns">>,
  +                 [
  +                  {<<"zone">>, [
  +                                {<<"name">>, Zone#zone.name},
  +                                {<<"version">>, Zone#zone.version},
  +                                % Note: Private key material is purposely omitted
  +                                {<<"records_count">>, length(erldns_zone_cache:get_zone_records(Zone#zone.name))}
  +                               ]}
  +                 ]
  +               }]).
  +
  +%% @doc Encode a Zone meta data plus all of its records into JSON.
   -spec zone_to_json(#zone{}) -> binary().
   zone_to_json(Zone) ->
     gen_server:call(?SERVER, {encode_zone, Zone}).
  +
  +%% @doc Encode the records in the zone with the given RRSet name and type into JSON
  +-spec zone_records_to_json(dns:dname(), dns:dname()) -> binary().
  +zone_records_to_json(ZoneName, RecordSetName) ->
  +  gen_server:call(?SERVER, {encode_zone_records, ZoneName, RecordSetName}).
  +
  +%% @doc Encode the records in the zone with the given RRSet name and type into JSON
  +-spec zone_records_to_json(dns:dname(), dns:dname(), dns:rrtype()) -> binary().
  +zone_records_to_json(ZoneName, RecordSetName, RecordSetType) ->
  +  gen_server:call(?SERVER, {encode_zone_records, ZoneName, RecordSetName, RecordSetType}).
   
   %% @doc Register a list of encoder modules.
   -spec register_encoders([module()]) -> ok.
  
positive.code: try_custom_encoders(_Record, []) ->
    {};
  try_custom_encoders(Record, [Encoder|Rest]) ->
    lager:debug("Trying custom encoder (encoder: ~p)", [Encoder]),
    case Encoder:encode_record(Record) of
      [] -> try_custom_encoders(Record, Rest);
      EncodedData -> EncodedData
  
negative.code:                ]
                }]).
  
  encode_zone_records_to_json(_ZoneName, RecordName, Encoders) ->
    Records = erldns_zone_cache:get_typed_records_by_name(RecordName),
    jsx:encode(lists:filter(record_filter(), lists:map(encode(Encoders), Records))).
  
  encode_zone_records_to_json(_ZoneName, RecordName, RecordType, Encoders) ->
    Records = erldns_zone_cache:get_records_by_name_and_type(RecordName, erldns_records:name_type(RecordType)),
    jsx:encode(lists:filter(record_filter(), lists:map(encode(Encoders), Records))).
  
  record_filter() ->
    fun(R) ->
        case R of
  