Options for 'json()' function.

interface IJsonOptions {
    encoding?: Nilable<BufferEncoding>;
    limit?: Nilable<number>;
    onLimitReached?: Nilable<HttpRequestHandler>;
    onParsingFailed?: Nilable<ParseErrorHandler>;
}

Hierarchy

Properties

encoding?: Nilable<BufferEncoding>

The custom string encoding to use.

Default

"utf8"
limit?: Nilable<number>

Defines the maximum size of the body, in bytes. (null) indicates to use NO limit

onLimitReached?: Nilable<HttpRequestHandler>

A custom handler, to tell the client, that the body is too big.

onParsingFailed?: Nilable<ParseErrorHandler>

A custom parse error handler.

Generated using TypeDoc