Class JsonToRecordParser

java.lang.Object
com.arpnetworking.metrics.mad.parsers.JsonToRecordParser
All Implemented Interfaces:
Parser<Record,byte[]>

public final class JsonToRecordParser extends Object implements Parser<Record,byte[]>
Implementation of Parser for the JSON metrics formats. The format represents each Record instance with one json object per line. Specifications for each version of the query log can be found in the metrics-client-doc repository.
Author:
Brandon Arp (brandon dot arp at inscopemetrics dot io), Ville Koskela (ville dot koskela at inscopemetrics dot io), Ryan Ascheman (rascheman at groupon dot com)
  • Method Details

    • parse

      public Record parse(byte[] data) throws ParsingException
      Description copied from interface: Parser
      Create a Record from a serialized representation.
      Specified by:
      parse in interface Parser<Record,byte[]>
      Parameters:
      data - Some serialized representation of a Record.
      Returns:
      Instance of Record from the data.
      Throws:
      ParsingException - If parsing of the data fails for any reason.