add RespondWithJSONEncoded and RespondWithJSONEncodedPtr handlers