← expressjs/express

CODEFOSSIL · express

res.json

method in lib/response.js:236 · Born 2011-06-28 (DERIVED, confidence 1.00)

15years old
29changes
6fixes
8authors
18callers
2012201320142015201620172018201920202021202220232024202520262011-07-06 73ea5cd Added `res.json()` JSONP support. Closes #7372011-07-06 0ae18bc removed jsonp stripping2011-07-07 60d16ea Revert "removed jsonp stripping"2011-07-15 d853f6c fixed some tests2011-08-04 c35cd7f Changed `res.{send,json}()` status code to the first arg at all times2012-02-07 ff92afa Added "json replacer" and "json spaces" settings. Closes #996 [credit to jed]2012-02-07 c44f018 utilize `res.set()` internally2012-04-26 8f87400 Fixed: use app.get() for all core settings2012-05-09 df2584c Added: allow [] in jsonp callback. Closes #11282012-06-27 70d6841 Added `res.json(obj, status)` support back for BC2012-06-27 2e8d44b docs2012-07-06 5426eb0 add "jsonp callback name" setting2012-08-29 89c5aff fix jsonp callback char restrictions2012-08-30 a6caa26 add res.jsonp(). Closes #13072012-09-26 0d3a637 add support for `res.json()` to retain previously defined Content-Types. Closes #13492012-09-26 88072a5 refactor2013-01-13 bb29da5 refactor vhost example2013-01-14 ab75fa0 refactor vhost example2013-06-05 138d74a remove charset from json responses. Closes #16312013-08-27 6cf6c8b Revert "remove charset from json responses. Closes #1631"2014-03-08 2064f41 remove res.charset usage2014-05-09 4e1e252 deprecate res.json(obj, status)2014-06-20 9c731f1 deprecate things with depd module2014-07-11 c6e6203 perf: fix arguments reassign deopt in some res methods2014-07-18 fd3b405 Deprecate combined status, response signatures2014-11-07 164638b Remove res.json(obj, status) signature2016-05-31 f90f9dd Improve performance for res.json/res.jsonp in most cases2017-01-28 25fdefa Remove res.json(status, obj) signature2017-09-28 7154014 Add "escape json" setting for res.json and res.jsonp2011-06-28 1386f80 Added res.json() and tests
Every commit that changed it, 2011-06-28 – 2017-09-28. Raised orange dots are fixes.
  1. Changed Add "escape json" setting for res.json and res.jsonp

    7154014 · Greg Guthe

  2. Changed Remove res.json(status, obj) signature

    25fdefa · Mike Tunnicliffe

  3. Changed Improve performance for res.json/res.jsonp in most cases

    f90f9dd · Benjamin Tan

  4. Changed Remove res.json(obj, status) signature

    164638b · Douglas Christopher Wilson

  5. Changed Deprecate combined status, response signatures

    fd3b405 · Douglas Christopher Wilson

  6. Changed perf: fix arguments reassign deopt in some res methods

    c6e6203 · Douglas Christopher Wilson fix · INFERRED

  7. Changed deprecate things with depd module

    9c731f1 · Douglas Christopher Wilson

  8. Changed deprecate res.json(obj, status)

    4e1e252 · Douglas Christopher Wilson

  9. Changed remove res.charset usage

    2064f41 · Jonathan Ong

  10. Changed Revert "remove charset from json responses. Closes #1631"

    6cf6c8b · TJ Holowaychuk fix · INFERRED

  11. Changed remove charset from json responses. Closes #1631

    138d74a · TJ Holowaychuk

  12. Changed refactor vhost example

    ab75fa0 · TJ Holowaychuk

  13. Changed refactor vhost example

    bb29da5 · TJ Holowaychuk

  14. Changed refactor

    88072a5 · TJ Holowaychuk

  15. Changed add support for `res.json()` to retain previously defined Content-Types. Closes #1349

    0d3a637 · TJ Holowaychuk

  16. Changed add res.jsonp(). Closes #1307

    a6caa26 · TJ Holowaychuk

  17. Changed fix jsonp callback char restrictions

    89c5aff · TJ Holowaychuk fix · INFERRED

  18. Changed add "jsonp callback name" setting

    5426eb0 · riadh

  19. Changed docs

    2e8d44b · TJ Holowaychuk

  20. Changed Added `res.json(obj, status)` support back for BC

    70d6841 · TJ Holowaychuk

  21. Changed Added: allow [] in jsonp callback. Closes #1128

    df2584c · TJ Holowaychuk

  22. Changed Fixed: use app.get() for all core settings

    8f87400 · TJ Holowaychuk fix · INFERRED

  23. Changed utilize `res.set()` internally

    c44f018 · TJ Holowaychuk

  24. Changed Added "json replacer" and "json spaces" settings. Closes #996 [credit to jed]

    ff92afa · TJ Holowaychuk

  25. Changed Changed `res.{send,json}()` status code to the first arg at all times

    c35cd7f · Tj Holowaychuk

  26. Changed fixed some tests

    d853f6c · Tj Holowaychuk fix · INFERRED

  27. Changed Revert "removed jsonp stripping"

    60d16ea · Tj Holowaychuk fix · INFERRED

  28. Changed removed jsonp stripping

    0ae18bc · Tj Holowaychuk

  29. Changed Added `res.json()` JSONP support. Closes #737

    73ea5cd · Tj Holowaychuk

  30. Born Added res.json() and tests

    1386f80 · Tj Holowaychuk