JSONLinesSerializer: JSONLinesSerializer Class

JSONLinesSerializerR Documentation

JSONLinesSerializer Class

Description

Serialize data to a JSON Lines formatted string.

Super classes

sagemaker.mlcore::BaseSerializer -> sagemaker.mlcore::SimpleBaseSerializer -> IdentitySerializer

Methods

Public methods

Inherited methods

Method new()

Initialize a “JSONLinesSerializer“ instance.

Usage
JSONLinesSerializer$new(content_type = "application/jsonlines")
Arguments
content_type

(str): The MIME type to signal to the inference endpoint when sending request data (default: "application/jsonlines").


Method serialize()

Serialize data of various formats to a JSON Lines formatted string.

Usage
JSONLinesSerializer$serialize(data)
Arguments
data

(object): Data to be serialized. The data can be a string, iterable of JSON serializable objects, or a file-like object.

Returns

str: The data serialized as a string containing newline-separated JSON values.


Method clone()

The objects of this class are cloneable with this method.

Usage
JSONLinesSerializer$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other serializer: BaseDeserializer, BaseSerializer, BytesDeserializer, CSVDeserializer, CSVSerializer, DataTableDeserializer, IdentitySerializer, JSONDeserializer, JSONLinesDeserializer, JSONSerializer, LibSVMSerializer, NumpyDeserializer, NumpySerializer, SimpleBaseDeserializer, SimpleBaseSerializer, SparseMatrixSerializer, StringDeserializer, TibbleDeserializer


DyfanJones/sagemaker-r-mlcore documentation built on May 3, 2022, 10:08 a.m.