diff --git a/Frequently-asked-questions.md b/Frequently-asked-questions.md index 29c0678..ba3dca4 100644 --- a/Frequently-asked-questions.md +++ b/Frequently-asked-questions.md @@ -21,4 +21,8 @@ Just add a rule at the end of your handlers list that matches everything: (r'.*', My404Handler) -In `My404Handler`, use `self.set_status(404)` and then render a page as usual. For non-404 errors, you can override `write_error` in your handler class. \ No newline at end of file +In `My404Handler`, use `self.set_status(404)` and then render a page as usual. For non-404 errors, you can override `write_error` in your handler class. + +## Why don't tornado.escape.json_encode and json_decode pass unknown keyword arguments to the underlying implementation? OR Why don't json_encode and json_decode use [some faster json library] when available? + +These two common requests are mutually exclusive - one ties json_encode more closely to a specific implementation, and the other requires the underlying implementation be swappable. In both cases I feel like the best approach is to leave tornado.escape.json_encode as a lowest-common-denominator json implementation that is available on all platforms where tornado runs. If you want more features that are provided by a specific json library, you should probably just import and use that library directly instead of using the tornado.escape version. \ No newline at end of file