Separating out JSON related code from base indexing functionality.
Added routing support for JSON conversion, so all URLs may be prefixed with /json/ to automatically convert or output in JSON(P)