Class JsonSerialization
- java.lang.Object
-
- com.azure.resourcemanager.streamanalytics.models.Serialization
-
- com.azure.resourcemanager.streamanalytics.models.JsonSerialization
-
public final class JsonSerialization extends Serialization
Describes how data from an input is serialized or how data is serialized when written to an output in JSON format.
-
-
Constructor Summary
Constructors Constructor Description JsonSerialization()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Encoding
encoding()
Get the encoding property: Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output.JsonOutputSerializationFormat
format()
Get the format property: This property only applies to JSON serialization of outputs only.void
validate()
Validates the instance.JsonSerialization
withEncoding(Encoding encoding)
Set the encoding property: Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output.JsonSerialization
withFormat(JsonOutputSerializationFormat format)
Set the format property: This property only applies to JSON serialization of outputs only.
-
-
-
Method Detail
-
encoding
public Encoding encoding()
Get the encoding property: Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.- Returns:
- the encoding value.
-
withEncoding
public JsonSerialization withEncoding(Encoding encoding)
Set the encoding property: Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.- Parameters:
encoding
- the encoding value to set.- Returns:
- the JsonSerialization object itself.
-
format
public JsonOutputSerializationFormat format()
Get the format property: This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be formatted as an array of JSON objects. Default value is 'lineSeparated' if left null.- Returns:
- the format value.
-
withFormat
public JsonSerialization withFormat(JsonOutputSerializationFormat format)
Set the format property: This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be formatted as an array of JSON objects. Default value is 'lineSeparated' if left null.- Parameters:
format
- the format value to set.- Returns:
- the JsonSerialization object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validate
in classSerialization
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-