NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
Serializer
editSerializer
editThis class is responsible of the serialization of every request, it offers the following methods:
-
serialize(object: any): string;
, serializes request objects -
deserialize(json: string): any;
, deserializes response strings -
ndserialize(array: any[]): string;
, serializes bulk request objects -
qserialize(object: any): string;
, serializes request query parameters
const { Client, Serializer } = require('@elastic/elasticsearch') class MySerializer extends Serializer { serialize (object) { // your code } } const client = new Client({ Serializer: MySerializer })