INNER CODE UNIT · JavaScript

jsonParser

expressjs/body-parser · lib/types/json.js:59

  return function jsonParser (req, res, next) {
    read(req, res, next, parse, debug, readOptions)
  }
}

/**
 * Create a JSON parse function
 *
 * @param {object} [options]
 * @return {function}
 * @private
 */
function createJsonParser (options) {
  const reviver = options?.reviver
  const strict = options?.strict !== false

  if (strict) {
    return function parse (body) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…