JsonSerialization Class
- java.
lang. Object - com.
azure. resourcemanager. streamanalytics. models. Serialization - com.
azure. resourcemanager. streamanalytics. models. JsonSerialization
- com.
- com.
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
| Constructor | Description |
|---|---|
| JsonSerialization() |
Creates an instance of Json |
Method Summary
| Modifier and Type | Method and 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. |
|
Json |
format()
Get the format property: This property only applies to JSON serialization of outputs only. |
|
static
Json |
fromJson(JsonReader jsonReader)
Reads an instance of Json |
|
Json |
toJson(JsonWriter jsonWriter) |
|
Event |
type()
Get the type property: Indicates the type of serialization that the input or output uses. |
| void |
validate()
Validates the instance. |
|
Json |
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. |
|
Json |
withFormat(JsonOutputSerializationFormat format)
Set the format property: This property only applies to JSON serialization of outputs only. |
Methods inherited from Serialization
Methods inherited from java.lang.Object
Constructor Details
JsonSerialization
public JsonSerialization()
Creates an instance of JsonSerialization class.
Method Details
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:
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:
fromJson
public static JsonSerialization fromJson(JsonReader jsonReader)
Reads an instance of JsonSerialization from the JsonReader.
Parameters:
Returns:
Throws:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
JsonSerialization.toJson(JsonWriter jsonWriter)Parameters:
Throws:
type
public EventSerializationType type()
Get the type property: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.
Overrides:
JsonSerialization.type()Returns:
validate
public void validate()
Validates the instance.
Overrides:
JsonSerialization.validate()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:
Returns:
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:
Returns: