import type { HttpMiddleware } from "@egomobile/http-server"; import type { JsonVersion } from "../types/index.js"; import type { Nilable } from "../types/internal.js"; import type { IBodyParserMiddlewareOptions } from "./index.js"; /** * Options for 'json()' function. */ export interface IJsonOptions extends IBodyParserMiddlewareOptions { /** * The custom version. */ version?: Nilable; } /** * Creates a new middleware, which reads input data as UTF-8 * string and tries to parse it to JSON object and writes this * object to `body` property of the current request context. * * @param {Nilable} [options] Custom options. */ export declare function json(): HttpMiddleware; export declare function json(options: Nilable): HttpMiddleware;