Rowno/node-rip — Issue #2: Move data filters to separate middleware
Author: Rowno
Created: 2012-02-04 10:17:36+00:00
State: open
Labels: improvement

Move the JSON decoding/encoding and JSONP encoding to separate middleware to allow greater control.

The JSON middleware will have a `mode` option which determines how the middleware will decide when to encode/decode data and can be either `auto` or `force`. `auto` decides using the headers (content-type/accepts) and the url (.json) and `force` will blindly try to encode/decode all data.