IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
ArrayToJSONSerializer
editArrayToJSONSerializer
editSerialize()
editThe ArrayToJSONSerializer
inspects the data to be encoded. If the request body
is provided as a string, it is passed directly to Elasticsearch as a string.
This allows users to provide raw JSON, or raw strings for certain endpoints that
dont have structure (such as the Analyze endpoint).
If the data is an array, it is converted to json. If the data provided was an
empty array, the serializer manually converts the JSON from an empty array ([]
)
to an empty object ({}
) so that it is valid JSON for Elasticsearch request
bodies.
Deserialize()
editWhen decoding the response body, everything is decoded to JSON from JSON. If
the data is not valid JSON, null
will be returned.