Changed the prototype to include Formatter instead of assuming the caller needs json as suggested by @jecluis