WARNING: Version 5.x has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. 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 })