class IntToStringKeyFilter extends AbstractFilter<ObjectNode, ObjectNode> {

	@Override
	protected ObjectNode doFilter(ObjectNode node) throws FilterException {
		JsonNode keyNode = node.at(source.getDomainIdKey());
		if (keyNode.isTextual()) return node;
		JsonNode parentNode = node.at(parentPointer);

		if (parentNode.isObject()) {
			// add to parent object
			((ObjectNode) parentNode).put(keyName, keyNode.asText());
		} else if (parentNode.isArray()) {
			// add to parent array
			((ArrayNode) parentNode).insert(Integer.valueOf(keyName), keyNode.asText());
		} else {
			throw new IllegalArgumentException("failed to find parent node for domainIdKey");
		}

		return node;
	}

	@Inject  IntToStringKeyFilter(
			@Assisted DataSource source,
			MetricRegistry registry);

}