code: public ObjectNode toJson() {
  		ObjectMapper mapper = new ObjectMapper();
  		ObjectNode node = mapper.createObjectNode();
  		ObjectNode unitIntervalNode = mapper.createObjectNode();
  
  		node.put(intervalUnit.getUnitNodeName(), unitIntervalNode);
  		unitIntervalNode.put("interval", buildIntervalNode());
  		unitIntervalNode.put("aggregationType", intervalUnit.name());
  
  		return node;
  	}
docs: Returns a JSON representation of this interval to send to the server.
  Used by the SDK internally.
  
  @return a JSON representation of this interval