Adding OutputFormatter base class

Well I gather that this is something specific to JsonFormatter or you want to address this for all formatters. I think we should track this as a separate workitem if you think there are specific user scenarios around this.