azure-docs-sdk-java/docs-ref-autogen/com.azure.json.JsonWriter.yml

1031 строка
103 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.json.JsonWriter"
fullName: "com.azure.json.JsonWriter"
name: "JsonWriter"
nameWithType: "JsonWriter"
summary: "Writes a JSON value as a stream of tokens."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public abstract class **JsonWriter**</br> implements <a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html\">Closeable</a>"
constructors:
- uid: "com.azure.json.JsonWriter.JsonWriter()"
fullName: "com.azure.json.JsonWriter.JsonWriter()"
name: "JsonWriter()"
nameWithType: "JsonWriter.JsonWriter()"
summary: "Creates an instance of <xref uid=\"com.azure.json.JsonWriter\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonWriter\"></xref>."
syntax: "public JsonWriter()"
desc: "Creates an instance of <xref uid=\"com.azure.json.JsonWriter\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonWriter\"></xref>."
methods:
- uid: "com.azure.json.JsonWriter.<T>writeArray(T[],com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>)"
fullName: "com.azure.json.JsonWriter.writeArray(T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
name: "writeArray(T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
nameWithType: "JsonWriter.writeArray(T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
summary: "Writes a JSON array."
modifiers:
- "final"
parameters:
- description: "The array being written."
name: "array"
type: "<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />[]"
- description: "The function that writes each element of the array."
name: "elementWriterFunc"
type: "<xref href=\"com.azure.json.WriteValueCallback?alt=com.azure.json.WriteValueCallback&text=WriteValueCallback\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public final JsonWriter <T>writeArray(T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
exceptions:
- description: "If <code>elementWriterFunc</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON array.\n\nThis API will begin by writing the start array (`[`) followed by all elements in the array using the `elementWriterFunc` and finishing by writing the end array (`]`).\n\nIf an element in the array is null, <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written for that element. If null elements should be excluded from serialization use <xref uid=\"com.azure.json.JsonWriter.writeArray*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeArray(Object[], WriteValueCallback, boolean)\"></xref> and pass true for `skipNullElements`.\n\nIf `array` is null <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.writeArrayField*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeArrayField(String, Object[], WriteValueCallback)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.<T>writeArray(T[],com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>,boolean)"
fullName: "com.azure.json.JsonWriter.writeArray(T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
name: "writeArray(T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
nameWithType: "JsonWriter.writeArray(T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
summary: "Writes a JSON array."
parameters:
- description: "The array being written."
name: "array"
type: "<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />[]"
- description: "The function that writes each element of the array."
name: "elementWriterFunc"
type: "<xref href=\"com.azure.json.WriteValueCallback?alt=com.azure.json.WriteValueCallback&text=WriteValueCallback\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "Whether null elements will be skipped."
name: "skipNullElements"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
syntax: "public JsonWriter <T>writeArray(T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
exceptions:
- description: "If <code>elementWriterFunc</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON array.\n\nThis API will begin by writing the start array (`[`) followed by all elements in the array using the `elementWriterFunc` and finishing by writing the end array (`]`).\n\nIf an element in the array is null, <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written for that element if `skipNullElements` is false. If `skipNullElements` is true, null elements will be excluded from serialization.\n\nIf `array` is null <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.writeArrayField*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeArrayField(String, Object[], WriteValueCallback, boolean)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.<T>writeArray(java.lang.Iterable<T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>)"
fullName: "com.azure.json.JsonWriter.writeArray(Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
name: "writeArray(Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
nameWithType: "JsonWriter.writeArray(Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
summary: "Writes a JSON array."
modifiers:
- "final"
parameters:
- description: "The array being written."
name: "array"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html\">Iterable</a>&lt;<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "The function that writes each element of the array."
name: "elementWriterFunc"
type: "<xref href=\"com.azure.json.WriteValueCallback?alt=com.azure.json.WriteValueCallback&text=WriteValueCallback\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public final JsonWriter <T>writeArray(Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
exceptions:
- description: "If <code>elementWriterFunc</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON array.\n\nThis API will begin by writing the start array (`[`) followed by all elements in the array using the `elementWriterFunc` and finishing by writing the end array (`]`).\n\nIf an element in the array is null, <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written for that element. If null elements should be excluded from serialization use <xref uid=\"com.azure.json.JsonWriter.<T>writeArray(java.lang.Iterable<T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>,boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeArray(Iterable, WriteValueCallback, boolean)\"></xref> and pass true for `skipNullElements`.\n\nIf `array` is null <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.<T>writeArrayField(java.lang.String,java.lang.Iterable<T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeArrayField(String, Iterable, WriteValueCallback)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.<T>writeArray(java.lang.Iterable<T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>,boolean)"
fullName: "com.azure.json.JsonWriter.writeArray(Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
name: "writeArray(Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
nameWithType: "JsonWriter.writeArray(Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
summary: "Writes a JSON array."
parameters:
- description: "The array being written."
name: "array"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html\">Iterable</a>&lt;<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "The function that writes each element of the array."
name: "elementWriterFunc"
type: "<xref href=\"com.azure.json.WriteValueCallback?alt=com.azure.json.WriteValueCallback&text=WriteValueCallback\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "Whether null elements will be skipped."
name: "skipNullElements"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
syntax: "public JsonWriter <T>writeArray(Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
exceptions:
- description: "If <code>elementWriterFunc</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON array.\n\nThis API will begin by writing the start array (`[`) followed by all elements in the array using the `elementWriterFunc` and finishing by writing the end array (`]`).\n\nIf an element in the array is null, <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written for that element if `skipNullElements` is false. If `skipNullElements` is true, null elements will be excluded from serialization.\n\nIf `array` is null <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.<T>writeArrayField(java.lang.String,java.lang.Iterable<T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>,boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeArrayField(String, Iterable, WriteValueCallback, boolean)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.<T>writeArrayField(java.lang.String,T[],com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>)"
fullName: "com.azure.json.JsonWriter.writeArrayField(String fieldName, T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
name: "writeArrayField(String fieldName, T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
nameWithType: "JsonWriter.writeArrayField(String fieldName, T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
summary: "Writes a JSON array field."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The array being written."
name: "array"
type: "<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />[]"
- description: "The function that writes each element of the array."
name: "elementWriterFunc"
type: "<xref href=\"com.azure.json.WriteValueCallback?alt=com.azure.json.WriteValueCallback&text=WriteValueCallback\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public final JsonWriter <T>writeArrayField(String fieldName, T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
exceptions:
- description: "If <code>fieldName</code> or <code>elementWriterFunc</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON array field.\n\nThis API will begin by writing the field name and start array (`[`) followed by all elements in the array using the `elementWriterFunc` and finishing by writing the end array (`]`).\n\nIf an element in the array is null, <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written for that element. If null elements should be excluded from serialization use <xref uid=\"com.azure.json.JsonWriter.writeArrayField*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeArrayField(String, Object[], WriteValueCallback, boolean)\"></xref> and pass true for `skipNullElements`.\n\nThe field is only written when `value` isn't null, if a null field needs to be written use <xref uid=\"com.azure.json.JsonWriter.writeNullableField*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNullableField(String, Object, WriteValueCallback)\"></xref>.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeArray*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeArray(Object[], WriteValueCallback)\"></xref> to simplify adding a key-value to a JSON object."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.<T>writeArrayField(java.lang.String,T[],com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>,boolean)"
fullName: "com.azure.json.JsonWriter.writeArrayField(String fieldName, T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
name: "writeArrayField(String fieldName, T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
nameWithType: "JsonWriter.writeArrayField(String fieldName, T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
summary: "Writes a JSON array field."
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The array being written."
name: "array"
type: "<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />[]"
- description: "The function that writes each element of the array."
name: "elementWriterFunc"
type: "<xref href=\"com.azure.json.WriteValueCallback?alt=com.azure.json.WriteValueCallback&text=WriteValueCallback\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "Whether null elements will be skipped."
name: "skipNullElements"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
syntax: "public JsonWriter <T>writeArrayField(String fieldName, T[] array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
exceptions:
- description: "If <code>fieldName</code> or <code>elementWriterFunc</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON array field.\n\nThis API will begin by writing the field name and start array (`[`) followed by all elements in the array using the `elementWriterFunc` and finishing by writing the end array (`]`).\n\nIf an element in the array is null, <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written for that element if `skipNullElements` is false. If `skipNullElements` is true, null elements will be excluded from serialization.\n\nThe field is only written when `value` isn't null, if a null field needs to be written use <xref uid=\"com.azure.json.JsonWriter.writeNullableField*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNullableField(String, Object, WriteValueCallback)\"></xref>.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeArray*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeArray(Object[], WriteValueCallback, boolean)\"></xref> to simplify adding a key-value to a JSON object."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.<T>writeArrayField(java.lang.String,java.lang.Iterable<T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>)"
fullName: "com.azure.json.JsonWriter.writeArrayField(String fieldName, Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
name: "writeArrayField(String fieldName, Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
nameWithType: "JsonWriter.writeArrayField(String fieldName, Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
summary: "Writes a JSON array field."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The array being written."
name: "array"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html\">Iterable</a>&lt;<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "The function that writes each element of the array."
name: "elementWriterFunc"
type: "<xref href=\"com.azure.json.WriteValueCallback?alt=com.azure.json.WriteValueCallback&text=WriteValueCallback\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public final JsonWriter <T>writeArrayField(String fieldName, Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc)"
exceptions:
- description: "If <code>fieldName</code> or <code>elementWriterFunc</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON array field.\n\nThis API will begin by writing the field name and start array (`[`) followed by all elements in the array using the `elementWriterFunc` and finishing by writing the end array (`]`).\n\nIf an element in the array is null, <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written for that element. If null elements should be excluded from serialization use <xref uid=\"com.azure.json.JsonWriter.<T>writeArrayField(java.lang.String,java.lang.Iterable<T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>,boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeArrayField(String, Iterable, WriteValueCallback, boolean)\"></xref> and pass true for `skipNullElements`.\n\nThe field is only written when `value` isn't null, if a null field needs to be written use <xref uid=\"com.azure.json.JsonWriter.writeNullableField*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNullableField(String, Object, WriteValueCallback)\"></xref>.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.<T>writeArray(java.lang.Iterable<T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeArray(Iterable, WriteValueCallback)\"></xref> to simplify adding a key-value to a JSON object."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.<T>writeArrayField(java.lang.String,java.lang.Iterable<T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>,boolean)"
fullName: "com.azure.json.JsonWriter.writeArrayField(String fieldName, Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
name: "writeArrayField(String fieldName, Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
nameWithType: "JsonWriter.writeArrayField(String fieldName, Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
summary: "Writes a JSON array field."
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The array being written."
name: "array"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html\">Iterable</a>&lt;<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "The function that writes each element of the array."
name: "elementWriterFunc"
type: "<xref href=\"com.azure.json.WriteValueCallback?alt=com.azure.json.WriteValueCallback&text=WriteValueCallback\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "Whether null elements will be skipped."
name: "skipNullElements"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
syntax: "public JsonWriter <T>writeArrayField(String fieldName, Iterable<T> array, WriteValueCallback<JsonWriter,T> elementWriterFunc, boolean skipNullElements)"
exceptions:
- description: "If <code>fieldName</code> or <code>elementWriterFunc</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON array field.\n\nThis API will begin by writing the field name and start array (`[`) followed by all elements in the array using the `elementWriterFunc` and finishing by writing the end array (`]`).\n\nIf an element in the array is null, <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written for that element if `skipNullElements` is false. If `skipNullElements` is true, null elements will be excluded from serialization.\n\nThe field is only written when `value` isn't null, if a null field needs to be written use <xref uid=\"com.azure.json.JsonWriter.writeNullableField*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNullableField(String, Object, WriteValueCallback)\"></xref>.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.<T>writeArray(java.lang.Iterable<T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>,boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeArray(Iterable, WriteValueCallback, boolean)\"></xref> to simplify adding a key-value to a JSON object."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.<T>writeMap(java.util.Map<java.lang.String,T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>)"
fullName: "com.azure.json.JsonWriter.writeMap(Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc)"
name: "writeMap(Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc)"
nameWithType: "JsonWriter.writeMap(Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc)"
summary: "Writes a JSON map."
modifiers:
- "final"
parameters:
- description: "The map being written."
name: "map"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "The function that writes value of each key-value pair in the map."
name: "valueWriterFunc"
type: "<xref href=\"com.azure.json.WriteValueCallback?alt=com.azure.json.WriteValueCallback&text=WriteValueCallback\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public final JsonWriter <T>writeMap(Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc)"
exceptions:
- description: "If <code>valueWriterFunc</code> is null or any key in the map is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON map.\n\nThis API will begin by writing the start object (`{`) followed by key-value fields in the map using the `valueWriterFunc` and finishing by writing the end object (`}`).\n\nIf any value in the map is null and the `valueWriterFunc` skips null values, such as <xref uid=\"com.azure.json.JsonWriter.writeJson(com.azure.json.JsonSerializable<?>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeJson(JsonSerializable)\"></xref>, <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written for that value. Otherwise, handling of the null value is determined by `valueWriterFunc`.\n\nIf `map` is null <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.<T>writeMapField(java.lang.String,java.util.Map<java.lang.String,T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeMapField(String, Map, WriteValueCallback)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.<T>writeMap(java.util.Map<java.lang.String,T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>,boolean)"
fullName: "com.azure.json.JsonWriter.writeMap(Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc, boolean skipNullValues)"
name: "writeMap(Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc, boolean skipNullValues)"
nameWithType: "JsonWriter.writeMap(Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc, boolean skipNullValues)"
summary: "Writes a JSON map."
parameters:
- description: "The map being written."
name: "map"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "The function that writes value of each key-value pair in the map."
name: "valueWriterFunc"
type: "<xref href=\"com.azure.json.WriteValueCallback?alt=com.azure.json.WriteValueCallback&text=WriteValueCallback\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "Whether null values in the map are skipped."
name: "skipNullValues"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
syntax: "public JsonWriter <T>writeMap(Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc, boolean skipNullValues)"
exceptions:
- description: "If <code>valueWriterFunc</code> is null or any key in the map is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON map.\n\nThis API will begin by writing the start object (`{`) followed by key-value fields in the map using the `valueWriterFunc` and finishing by writing the end object (`}`).\n\nIf a value in the map is null and `skipNullValues` is true, that key-value pair will be skipped. Otherwise, handling of the null value will be based on `valueWriterFunc`. If `valueWriterFunc` skips null values, such as <xref uid=\"com.azure.json.JsonWriter.writeJson(com.azure.json.JsonSerializable<?>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeJson(JsonSerializable)\"></xref>, <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written for that value.\n\nIf `map` is null <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.<T>writeMapField(java.lang.String,java.util.Map<java.lang.String,T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>,boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeMapField(String, Map, WriteValueCallback, boolean)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.<T>writeMapField(java.lang.String,java.util.Map<java.lang.String,T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>)"
fullName: "com.azure.json.JsonWriter.writeMapField(String fieldName, Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc)"
name: "writeMapField(String fieldName, Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc)"
nameWithType: "JsonWriter.writeMapField(String fieldName, Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc)"
summary: "Writes a JSON map field."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The map being written."
name: "map"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "The function that writes each value of the map."
name: "valueWriterFunc"
type: "<xref href=\"com.azure.json.WriteValueCallback?alt=com.azure.json.WriteValueCallback&text=WriteValueCallback\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public final JsonWriter <T>writeMapField(String fieldName, Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc)"
exceptions:
- description: "If <code>fieldName</code> or <code>valueWriterFunc</code> is null or any key in the map is\n null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON map field.\n\nThis API will begin by writing the field name and start object (`{`) followed by key-value fields in the map using the `valueWriterFunc` and finishing by writing the end object (`}`).\n\nIf any value in the map is null and the `valueWriterFunc` skips null values, such as <xref uid=\"com.azure.json.JsonWriter.writeJson(com.azure.json.JsonSerializable<?>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeJson(JsonSerializable)\"></xref>, <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written for that value. Otherwise, handling of the null value is determined by `valueWriterFunc`.\n\nThe field is only written when `value` isn't null, if a null field needs to be written use <xref uid=\"com.azure.json.JsonWriter.writeNullableField*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNullableField(String, Object, WriteValueCallback)\"></xref>.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.<T>writeMap(java.util.Map<java.lang.String,T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeMap(Map, WriteValueCallback)\"></xref> to simplify adding a key-value to a JSON object."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.<T>writeMapField(java.lang.String,java.util.Map<java.lang.String,T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>,boolean)"
fullName: "com.azure.json.JsonWriter.writeMapField(String fieldName, Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc, boolean skipNullValues)"
name: "writeMapField(String fieldName, Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc, boolean skipNullValues)"
nameWithType: "JsonWriter.writeMapField(String fieldName, Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc, boolean skipNullValues)"
summary: "Writes a JSON map field."
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The map being written."
name: "map"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "The function that writes each value of the map."
name: "valueWriterFunc"
type: "<xref href=\"com.azure.json.WriteValueCallback?alt=com.azure.json.WriteValueCallback&text=WriteValueCallback\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "Whether null values in the map are skipped."
name: "skipNullValues"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
syntax: "public JsonWriter <T>writeMapField(String fieldName, Map<String,T> map, WriteValueCallback<JsonWriter,T> valueWriterFunc, boolean skipNullValues)"
exceptions:
- description: "If <code>fieldName</code> or <code>valueWriterFunc</code> is null or any key in the map is\n null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON map field.\n\nThis API will begin by writing the field name and start object (`{`) followed by key-value fields in the map using the `valueWriterFunc` and finishing by writing the end object (`}`).\n\nIf a value in the map is null and `skipNullValues` is true, that key-value pair will be skipped. Otherwise, handling of the null value will be based on `valueWriterFunc`. If `valueWriterFunc` skips null values, such as <xref uid=\"com.azure.json.JsonWriter.writeJson(com.azure.json.JsonSerializable<?>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeJson(JsonSerializable)\"></xref>, <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written for that value.\n\nThe field is only written when `value` isn't null, if a null field needs to be written use <xref uid=\"com.azure.json.JsonWriter.writeNullableField*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNullableField(String, Object, WriteValueCallback)\"></xref>.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.<T>writeMap(java.util.Map<java.lang.String,T>,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>,boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeMap(Map, WriteValueCallback, boolean)\"></xref> to simplify adding a key-value to a JSON object."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.<T>writeNullableField(java.lang.String,T,com.azure.json.WriteValueCallback<com.azure.json.JsonWriter,T>)"
fullName: "com.azure.json.JsonWriter.writeNullableField(String fieldName, T nullable, WriteValueCallback<JsonWriter,T> writerFunc)"
name: "writeNullableField(String fieldName, T nullable, WriteValueCallback<JsonWriter,T> writerFunc)"
nameWithType: "JsonWriter.writeNullableField(String fieldName, T nullable, WriteValueCallback<JsonWriter,T> writerFunc)"
summary: "Writes a nullable JSON field."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The nullable JSON value."
name: "nullable"
type: "<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />"
- description: "The non-null JSON value writer function."
name: "writerFunc"
type: "<xref href=\"com.azure.json.WriteValueCallback?alt=com.azure.json.WriteValueCallback&text=WriteValueCallback\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />,<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public final JsonWriter <T>writeNullableField(String fieldName, T nullable, WriteValueCallback<JsonWriter,T> writerFunc)"
exceptions:
- description: "If <code>fieldName</code> or <code>writerFunc</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a nullable JSON field.\n\nWhen the `value` is null this effectively is the same as <xref uid=\"com.azure.json.JsonWriter.writeNullField(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNullField(String)\"></xref>. When the `value` isn't null this will write the JSON field name and call the `writerFunc` that is supplied with the non-null nullable value and this <xref uid=\"com.azure.json.JsonWriter\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonWriter\"></xref> to perform the write operation."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.close()"
fullName: "com.azure.json.JsonWriter.close()"
name: "close()"
nameWithType: "JsonWriter.close()"
summary: "Closes the JSON stream."
modifiers:
- "abstract"
syntax: "public abstract void close()"
exceptions:
- description: "If the <xref uid=\"JsonWriter\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonWriter\"></xref> is closed before the\n <xref uid=\"#getWriteContext()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"writing context\"></xref> is <xref uid=\"JsonWriteContext#COMPLETED\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonWriteContext#COMPLETED\"></xref>."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Closes the JSON stream.\n\nIf the <xref uid=\"com.azure.json.JsonWriter.getWriteContext()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"writing context\"></xref> isn't <xref uid=\"com.azure.json.JsonWriteContext.COMPLETED\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonWriteContext#COMPLETED\"></xref> when this is called an <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IllegalStateException\"></xref> will be thrown.\n\nDuring closing the implementation of <xref uid=\"com.azure.json.JsonWriter\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonWriter\"></xref> must flush any un-flushed content."
- uid: "com.azure.json.JsonWriter.flush()"
fullName: "com.azure.json.JsonWriter.flush()"
name: "flush()"
nameWithType: "JsonWriter.flush()"
summary: "Flushes any un-flushed content written to this writer."
modifiers:
- "abstract"
syntax: "public abstract JsonWriter flush()"
exceptions:
- description: "If the underlying content fails to flush."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Flushes any un-flushed content written to this writer.\n\nIt should be assumed that each write call won't flush any contents."
returns:
description: "The flushed JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.getWriteContext()"
fullName: "com.azure.json.JsonWriter.getWriteContext()"
name: "getWriteContext()"
nameWithType: "JsonWriter.getWriteContext()"
summary: "Gets the current <xref uid=\"com.azure.json.JsonWriteContext\" data-throw-if-not-resolved=\"false\" data-raw-source=\"writing context\"></xref> for the JSON object."
modifiers:
- "abstract"
syntax: "public abstract JsonWriteContext getWriteContext()"
desc: "Gets the current <xref uid=\"com.azure.json.JsonWriteContext\" data-throw-if-not-resolved=\"false\" data-raw-source=\"writing context\"></xref> for the JSON object.\n\nThe writing context can help determine whether a write operation would be illegal.\n\nThe initial write context is <xref uid=\"com.azure.json.JsonWriteContext.ROOT\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonWriteContext#ROOT\"></xref>."
returns:
description: "The current writing context."
type: "<xref href=\"com.azure.json.JsonWriteContext?alt=com.azure.json.JsonWriteContext&text=JsonWriteContext\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeBinary(byte[])"
fullName: "com.azure.json.JsonWriter.writeBinary(byte[] value)"
name: "writeBinary(byte[] value)"
nameWithType: "JsonWriter.writeBinary(byte[] value)"
summary: "Writes a JSON binary value."
modifiers:
- "abstract"
parameters:
- description: "Binary value to write."
name: "value"
type: "<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]"
syntax: "public abstract JsonWriter writeBinary(byte[] value)"
exceptions:
- description: "If the binary <code>value</code> fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON binary value.\n\nIf `value` is null <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.writeBinaryField(java.lang.String,byte[])\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeBinaryField(String, byte[])\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeBinaryField(java.lang.String,byte[])"
fullName: "com.azure.json.JsonWriter.writeBinaryField(String fieldName, byte[] value)"
name: "writeBinaryField(String fieldName, byte[] value)"
nameWithType: "JsonWriter.writeBinaryField(String fieldName, byte[] value)"
summary: "Writes a JSON binary field."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Binary value to write."
name: "value"
type: "<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]"
syntax: "public final JsonWriter writeBinaryField(String fieldName, byte[] value)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON binary field.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeBinary(byte[])\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeBinary(byte[])\"></xref> to simplify adding a key-value to a JSON object.\n\nThe field is only written when `value` isn't null, if a null field needs to be written use <xref uid=\"com.azure.json.JsonWriter.writeNullableField*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNullableField(String, Object, WriteValueCallback)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeBoolean(boolean)"
fullName: "com.azure.json.JsonWriter.writeBoolean(boolean value)"
name: "writeBoolean(boolean value)"
nameWithType: "JsonWriter.writeBoolean(boolean value)"
summary: "Writes a JSON boolean value (`true` or `false`)."
modifiers:
- "abstract"
parameters:
- description: "boolean value to write."
name: "value"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract JsonWriter writeBoolean(boolean value)"
exceptions:
- description: "If the boolean <code>value</code> fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON boolean value (`true` or `false`).\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.writeBooleanField(java.lang.String,boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeBooleanField(String, boolean)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>.\n\nFor the nullable `Boolean` use <xref uid=\"com.azure.json.JsonWriter.writeBoolean(java.lang.Boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeBoolean(Boolean)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeBoolean(java.lang.Boolean)"
fullName: "com.azure.json.JsonWriter.writeBoolean(Boolean value)"
name: "writeBoolean(Boolean value)"
nameWithType: "JsonWriter.writeBoolean(Boolean value)"
summary: "Writes a nullable JSON boolean value (`true`, `false`, or `null`)."
modifiers:
- "final"
parameters:
- description: "Boolean value to write."
name: "value"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
syntax: "public final JsonWriter writeBoolean(Boolean value)"
exceptions:
- description: "If the Boolean <code>value</code> fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a nullable JSON boolean value (`true`, `false`, or `null`).\n\nIf `value` is null <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.writeBooleanField(java.lang.String,java.lang.Boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeBooleanField(String, Boolean)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>.\n\nFor the primitive `boolean` use <xref uid=\"com.azure.json.JsonWriter.writeBoolean(boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeBoolean(boolean)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeBooleanField(java.lang.String,boolean)"
fullName: "com.azure.json.JsonWriter.writeBooleanField(String fieldName, boolean value)"
name: "writeBooleanField(String fieldName, boolean value)"
nameWithType: "JsonWriter.writeBooleanField(String fieldName, boolean value)"
summary: "Writes a JSON boolean field."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "boolean value to write."
name: "value"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
syntax: "public final JsonWriter writeBooleanField(String fieldName, boolean value)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON boolean field.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeBoolean(boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeBoolean(boolean)\"></xref> to simplify adding a key-value to a JSON object."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeBooleanField(java.lang.String,java.lang.Boolean)"
fullName: "com.azure.json.JsonWriter.writeBooleanField(String fieldName, Boolean value)"
name: "writeBooleanField(String fieldName, Boolean value)"
nameWithType: "JsonWriter.writeBooleanField(String fieldName, Boolean value)"
summary: "Writes a nullable JSON boolean field."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Boolean value to write."
name: "value"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
syntax: "public final JsonWriter writeBooleanField(String fieldName, Boolean value)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a nullable JSON boolean field.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeBoolean(java.lang.Boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeBoolean(Boolean)\"></xref> to simplify adding a key-value to a JSON object.\n\nThe field is only written when `value` isn't null, if a null field needs to be written use <xref uid=\"com.azure.json.JsonWriter.writeNullableField*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNullableField(String, Object, WriteValueCallback)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeDouble(double)"
fullName: "com.azure.json.JsonWriter.writeDouble(double value)"
name: "writeDouble(double value)"
nameWithType: "JsonWriter.writeDouble(double value)"
summary: "Writes a JSON double value."
modifiers:
- "abstract"
parameters:
- description: "double value to write."
name: "value"
type: "<xref href=\"double?alt=double&text=double\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract JsonWriter writeDouble(double value)"
exceptions:
- description: "If the double <code>value</code> fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON double value.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.writeDoubleField(java.lang.String,double)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeDoubleField(String, double)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>.\n\nFor the nullable `Double` use <xref uid=\"com.azure.json.JsonWriter.writeNumber(java.lang.Number)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNumber(Number)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeDoubleField(java.lang.String,double)"
fullName: "com.azure.json.JsonWriter.writeDoubleField(String fieldName, double value)"
name: "writeDoubleField(String fieldName, double value)"
nameWithType: "JsonWriter.writeDoubleField(String fieldName, double value)"
summary: "Writes a JSON double field."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "double value to write."
name: "value"
type: "<xref href=\"double?alt=double&text=double\" data-throw-if-not-resolved=\"False\" />"
syntax: "public final JsonWriter writeDoubleField(String fieldName, double value)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON double field.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeDouble(double)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeDouble(double)\"></xref> to simplify adding a key-value to a JSON object."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeEndArray()"
fullName: "com.azure.json.JsonWriter.writeEndArray()"
name: "writeEndArray()"
nameWithType: "JsonWriter.writeEndArray()"
summary: "Writes a JSON end array (`]`)."
modifiers:
- "abstract"
syntax: "public abstract JsonWriter writeEndArray()"
exceptions:
- description: "If JSON end array fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON end array (`]`)."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeEndObject()"
fullName: "com.azure.json.JsonWriter.writeEndObject()"
name: "writeEndObject()"
nameWithType: "JsonWriter.writeEndObject()"
summary: "Writes a JSON end object (`}`)."
modifiers:
- "abstract"
syntax: "public abstract JsonWriter writeEndObject()"
exceptions:
- description: "If JSON end object fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON end object (`}`).\n\nIf the current writing context isn't an object an <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IllegalStateException\"></xref> will be thrown."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeFieldName(java.lang.String)"
fullName: "com.azure.json.JsonWriter.writeFieldName(String fieldName)"
name: "writeFieldName(String fieldName)"
nameWithType: "JsonWriter.writeFieldName(String fieldName)"
summary: "Writes a JSON field name (`\"fieldName\":`)."
modifiers:
- "abstract"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public abstract JsonWriter writeFieldName(String fieldName)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON field name (`\"fieldName\":`)."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeFloat(float)"
fullName: "com.azure.json.JsonWriter.writeFloat(float value)"
name: "writeFloat(float value)"
nameWithType: "JsonWriter.writeFloat(float value)"
summary: "Writes a JSON float value."
modifiers:
- "abstract"
parameters:
- description: "float value to write."
name: "value"
type: "<xref href=\"float?alt=float&text=float\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract JsonWriter writeFloat(float value)"
exceptions:
- description: "If the float <code>value</code> fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON float value.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.writeFloatField(java.lang.String,float)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFloatField(String, float)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>.\n\nFor the nullable `Float` use <xref uid=\"com.azure.json.JsonWriter.writeNumber(java.lang.Number)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNumber(Number)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeFloatField(java.lang.String,float)"
fullName: "com.azure.json.JsonWriter.writeFloatField(String fieldName, float value)"
name: "writeFloatField(String fieldName, float value)"
nameWithType: "JsonWriter.writeFloatField(String fieldName, float value)"
summary: "Writes a JSON float field."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "float value to write."
name: "value"
type: "<xref href=\"float?alt=float&text=float\" data-throw-if-not-resolved=\"False\" />"
syntax: "public final JsonWriter writeFloatField(String fieldName, float value)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON float field.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeFloat(float)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFloat(float)\"></xref> to simplify adding a key-value to a JSON object."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeInt(int)"
fullName: "com.azure.json.JsonWriter.writeInt(int value)"
name: "writeInt(int value)"
nameWithType: "JsonWriter.writeInt(int value)"
summary: "Writes a JSON int value."
modifiers:
- "abstract"
parameters:
- description: "int value to write."
name: "value"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract JsonWriter writeInt(int value)"
exceptions:
- description: "If the int <code>value</code> fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON int value.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.writeIntField(java.lang.String,int)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeIntField(String, int)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>.\n\nFor the nullable `Integer` use <xref uid=\"com.azure.json.JsonWriter.writeNumber(java.lang.Number)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNumber(Number)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeIntField(java.lang.String,int)"
fullName: "com.azure.json.JsonWriter.writeIntField(String fieldName, int value)"
name: "writeIntField(String fieldName, int value)"
nameWithType: "JsonWriter.writeIntField(String fieldName, int value)"
summary: "Writes a JSON int field."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "int value to write."
name: "value"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "public final JsonWriter writeIntField(String fieldName, int value)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON int field.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeInt(int)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeInt(int)\"></xref> to simplify adding a key-value to a JSON object."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeJson(com.azure.json.JsonSerializable<?>)"
fullName: "com.azure.json.JsonWriter.writeJson(JsonSerializable<?> value)"
name: "writeJson(JsonSerializable<?> value)"
nameWithType: "JsonWriter.writeJson(JsonSerializable<?> value)"
summary: "Writes a <xref uid=\"com.azure.json.JsonSerializable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonSerializable\"></xref> object."
modifiers:
- "final"
parameters:
- description: "<xref uid=\"com.azure.json.JsonSerializable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonSerializable\"></xref> object to write."
name: "value"
type: "<xref href=\"com.azure.json.JsonSerializable?alt=com.azure.json.JsonSerializable&text=JsonSerializable\" data-throw-if-not-resolved=\"False\" />&lt;?&gt;"
syntax: "public final JsonWriter writeJson(JsonSerializable<?> value)"
exceptions:
- description: "If the <xref uid=\"JsonSerializable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonSerializable\"></xref> fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a <xref uid=\"com.azure.json.JsonSerializable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonSerializable\"></xref> object.\n\nIf `value` is null <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.writeJsonField(java.lang.String,com.azure.json.JsonSerializable<?>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeJsonField(String, JsonSerializable)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeJsonField(java.lang.String,com.azure.json.JsonSerializable<?>)"
fullName: "com.azure.json.JsonWriter.writeJsonField(String fieldName, JsonSerializable<?> value)"
name: "writeJsonField(String fieldName, JsonSerializable<?> value)"
nameWithType: "JsonWriter.writeJsonField(String fieldName, JsonSerializable<?> value)"
summary: "Writes a <xref uid=\"com.azure.json.JsonSerializable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonSerializable\"></xref> field."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "<xref uid=\"com.azure.json.JsonSerializable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonSerializable\"></xref> object to write."
name: "value"
type: "<xref href=\"com.azure.json.JsonSerializable?alt=com.azure.json.JsonSerializable&text=JsonSerializable\" data-throw-if-not-resolved=\"False\" />&lt;?&gt;"
syntax: "public final JsonWriter writeJsonField(String fieldName, JsonSerializable<?> value)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a <xref uid=\"com.azure.json.JsonSerializable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonSerializable\"></xref> field.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeJson(com.azure.json.JsonSerializable<?>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeJson(JsonSerializable)\"></xref> to simplify adding a key-value to a JSON object.\n\nThe field is only written when `value` isn't null, if a null field needs to be written use <xref uid=\"com.azure.json.JsonWriter.writeNullableField*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNullableField(String, Object, WriteValueCallback)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeLong(long)"
fullName: "com.azure.json.JsonWriter.writeLong(long value)"
name: "writeLong(long value)"
nameWithType: "JsonWriter.writeLong(long value)"
summary: "Writes a JSON long value."
modifiers:
- "abstract"
parameters:
- description: "long value to write."
name: "value"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract JsonWriter writeLong(long value)"
exceptions:
- description: "If the long <code>value</code> fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON long value.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.writeLongField(java.lang.String,long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeLongField(String, long)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>.\n\nFor the nullable `Long` use <xref uid=\"com.azure.json.JsonWriter.writeNumber(java.lang.Number)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNumber(Number)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeLongField(java.lang.String,long)"
fullName: "com.azure.json.JsonWriter.writeLongField(String fieldName, long value)"
name: "writeLongField(String fieldName, long value)"
nameWithType: "JsonWriter.writeLongField(String fieldName, long value)"
summary: "Writes a JSON long field."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "long value to write."
name: "value"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public final JsonWriter writeLongField(String fieldName, long value)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON long field.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeLong(long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeLong(long)\"></xref> to simplify adding a key-value to a JSON object."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeNull()"
fullName: "com.azure.json.JsonWriter.writeNull()"
name: "writeNull()"
nameWithType: "JsonWriter.writeNull()"
summary: "Writes a JSON null."
modifiers:
- "abstract"
syntax: "public abstract JsonWriter writeNull()"
exceptions:
- description: "If a JSON null fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON null.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.writeNullField(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNullField(String)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeNullField(java.lang.String)"
fullName: "com.azure.json.JsonWriter.writeNullField(String fieldName)"
name: "writeNullField(String fieldName)"
nameWithType: "JsonWriter.writeNullField(String fieldName)"
summary: "Writes a JSON null field (`\"fieldName\":null`)."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public final JsonWriter writeNullField(String fieldName)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON null field (`\"fieldName\":null`).\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeNull()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNull()\"></xref> to simplify adding a key-value to a JSON object."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeNumber(java.lang.Number)"
fullName: "com.azure.json.JsonWriter.writeNumber(Number value)"
name: "writeNumber(Number value)"
nameWithType: "JsonWriter.writeNumber(Number value)"
summary: "Writes a nullable JSON number value."
modifiers:
- "final"
parameters:
- description: "Number value to write."
name: "value"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html\">Number</a>"
syntax: "public final JsonWriter writeNumber(Number value)"
exceptions:
- description: "If the Number <code>value</code> fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a nullable JSON number value.\n\nIf `value` is null <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.writeNumberField(java.lang.String,java.lang.Number)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNumberField(String, Number)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeNumberField(java.lang.String,java.lang.Number)"
fullName: "com.azure.json.JsonWriter.writeNumberField(String fieldName, Number value)"
name: "writeNumberField(String fieldName, Number value)"
nameWithType: "JsonWriter.writeNumberField(String fieldName, Number value)"
summary: "Writes a nullable JSON number field."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Number value to write."
name: "value"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html\">Number</a>"
syntax: "public final JsonWriter writeNumberField(String fieldName, Number value)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a nullable JSON number field.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeNumber(java.lang.Number)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNumber(Number)\"></xref> to simplify adding a key-value to a JSON object.\n\nThe field is only written when `value` isn't null, if a null field needs to be written use <xref uid=\"com.azure.json.JsonWriter.writeNullableField*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNullableField(String, Object, WriteValueCallback)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeRawField(java.lang.String,java.lang.String)"
fullName: "com.azure.json.JsonWriter.writeRawField(String fieldName, String value)"
name: "writeRawField(String fieldName, String value)"
nameWithType: "JsonWriter.writeRawField(String fieldName, String value)"
summary: "Writes the passed field literally without any additional handling."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The raw JSON value to write."
name: "value"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public final JsonWriter writeRawField(String fieldName, String value)"
exceptions:
- description: "If <code>fieldName</code> or <code>value</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes the passed field literally without any additional handling.\n\nUse this API when writing a String value that is already properly formatted JSON, such as a JSON string (`\"\\\"string\\\"\"`), number (`\"42\"`, `\"42.0\"`), boolean (`\"true\"`, `\"false\"`), null (`\"null\"`), array (`\"[\\\"string\\\", \\\"array\\\"]\"`), or object (`{\"\\\"field\\\":\\\"value\\\"\"}`).\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeRawValue(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeRawValue(String)\"></xref> to simplify adding a key-value to a JSON object."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeRawValue(java.lang.String)"
fullName: "com.azure.json.JsonWriter.writeRawValue(String value)"
name: "writeRawValue(String value)"
nameWithType: "JsonWriter.writeRawValue(String value)"
summary: "Writes the passed value literally without any additional handling."
modifiers:
- "abstract"
parameters:
- description: "The raw JSON value to write."
name: "value"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public abstract JsonWriter writeRawValue(String value)"
exceptions:
- description: "If <code>value</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes the passed value literally without any additional handling.\n\nUse this API when writing a String value that is already properly formatted JSON, such as a JSON string (`\"\\\"string\\\"\"`), number (`\"42\"`, `\"42.0\"`), boolean (`\"true\"`, `\"false\"`), null (`\"null\"`), array (`\"[\\\"string\\\", \\\"array\\\"]\"`), or object (`{\"\\\"field\\\":\\\"value\\\"\"}`).\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.writeRawField(java.lang.String,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeRawField(String, String)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeStartArray()"
fullName: "com.azure.json.JsonWriter.writeStartArray()"
name: "writeStartArray()"
nameWithType: "JsonWriter.writeStartArray()"
summary: "Writes a JSON start array (`[`)."
modifiers:
- "abstract"
syntax: "public abstract JsonWriter writeStartArray()"
exceptions:
- description: "If JSON start array fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON start array (`[`)."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeStartArray(java.lang.String)"
fullName: "com.azure.json.JsonWriter.writeStartArray(String fieldName)"
name: "writeStartArray(String fieldName)"
nameWithType: "JsonWriter.writeStartArray(String fieldName)"
summary: "Writes a JSON start array (`[`) with a preceding field name."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public final JsonWriter writeStartArray(String fieldName)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON start array (`[`) with a preceding field name.\n\nThis API is the equivalent of calling <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeStartArray()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeStartArray()\"></xref>, in that order."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeStartObject()"
fullName: "com.azure.json.JsonWriter.writeStartObject()"
name: "writeStartObject()"
nameWithType: "JsonWriter.writeStartObject()"
summary: "Writes a JSON start object (`{`)."
modifiers:
- "abstract"
syntax: "public abstract JsonWriter writeStartObject()"
exceptions:
- description: "If JSON start object fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON start object (`{`)."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeStartObject(java.lang.String)"
fullName: "com.azure.json.JsonWriter.writeStartObject(String fieldName)"
name: "writeStartObject(String fieldName)"
nameWithType: "JsonWriter.writeStartObject(String fieldName)"
summary: "Writes a JSON start object (`{`) with a preceding field name."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public final JsonWriter writeStartObject(String fieldName)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON start object (`{`) with a preceding field name.\n\nThis API is the equivalent of calling <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeStartObject()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeStartObject()\"></xref>, in that order."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeString(java.lang.String)"
fullName: "com.azure.json.JsonWriter.writeString(String value)"
name: "writeString(String value)"
nameWithType: "JsonWriter.writeString(String value)"
summary: "Writes a JSON String value."
modifiers:
- "abstract"
parameters:
- description: "String value to write."
name: "value"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public abstract JsonWriter writeString(String value)"
exceptions:
- description: "If the String <code>value</code> fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON String value.\n\nIf `value` is null <xref uid=\"com.azure.json.JsonToken.NULL\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonToken#NULL\"></xref> will be written.\n\nThis API is used instead of <xref uid=\"com.azure.json.JsonWriter.writeStringField(java.lang.String,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeStringField(String, String)\"></xref> when the value needs to be written to the root of the JSON value, as an element in an array, or after a call to <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeStringField(java.lang.String,java.lang.String)"
fullName: "com.azure.json.JsonWriter.writeStringField(String fieldName, String value)"
name: "writeStringField(String fieldName, String value)"
nameWithType: "JsonWriter.writeStringField(String fieldName, String value)"
summary: "Writes a JSON String field."
modifiers:
- "final"
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "String value to write."
name: "value"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public final JsonWriter writeStringField(String fieldName, String value)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes a JSON String field.\n\nCombines <xref uid=\"com.azure.json.JsonWriter.writeFieldName(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFieldName(String)\"></xref> and <xref uid=\"com.azure.json.JsonWriter.writeString(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeString(String)\"></xref> to simplify adding a key-value to a JSON object.\n\nThe field is only written when `value` isn't null, if a null field needs to be written use <xref uid=\"com.azure.json.JsonWriter.writeNullableField*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNullableField(String, Object, WriteValueCallback)\"></xref>."
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeUntyped(java.lang.Object)"
fullName: "com.azure.json.JsonWriter.writeUntyped(Object value)"
name: "writeUntyped(Object value)"
nameWithType: "JsonWriter.writeUntyped(Object value)"
summary: "Writes the unknown type `value`."
parameters:
- description: "The value to write."
name: "value"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
syntax: "public JsonWriter writeUntyped(Object value)"
exceptions:
- description: "If the untyped <code>value</code> fails to be written."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes the unknown type `value`.\n\nThe following is how each `value` is handled (in this order):\n\n * null -> <xref uid=\"com.azure.json.JsonWriter.writeNull()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNull()\"></xref>\n * `short` \\-> <xref uid=\"com.azure.json.JsonWriter.writeInt(int)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeInt(int)\"></xref>\n * `int` \\-> <xref uid=\"com.azure.json.JsonWriter.writeInt(int)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeInt(int)\"></xref>\n * `long` \\-> <xref uid=\"com.azure.json.JsonWriter.writeLong(long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeLong(long)\"></xref>\n * `float` \\-> <xref uid=\"com.azure.json.JsonWriter.writeFloat(float)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFloat(float)\"></xref>\n * `double` \\-> <xref uid=\"com.azure.json.JsonWriter.writeDouble(double)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeDouble(double)\"></xref>\n * `boolean` \\-> <xref uid=\"com.azure.json.JsonWriter.writeBoolean(boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeBoolean(boolean)\"></xref>\n * <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CharSequence\"></xref> \\-> <xref uid=\"com.azure.json.JsonWriter.writeString(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeString(String)\"></xref>\n * `char` \\-> <xref uid=\"com.azure.json.JsonWriter.writeString(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeString(String)\"></xref>\n * <xref uid=\"com.azure.json.JsonSerializable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonSerializable\"></xref> \\-> <xref uid=\"com.azure.json.JsonWriter.writeJson(com.azure.json.JsonSerializable<?>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeJson(JsonSerializable)\"></xref>\n * `Object[]` \\-> <xref uid=\"com.azure.json.JsonWriter.writeUntyped(java.lang.Object)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeUntyped(Object)\"></xref> for each element\n * <xref uid=\"java.lang.Iterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Iterable\"></xref> \\-> <xref uid=\"com.azure.json.JsonWriter.writeUntyped(java.lang.Object)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeUntyped(Object)\"></xref> for each element\n * <xref uid=\"java.util.Map\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Map\"></xref> \\-> <xref uid=\"com.azure.json.JsonWriter.writeUntyped(java.lang.Object)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeUntyped(Object)\"></xref> for each element where the key to `toString`'d\n * <xref uid=\"java.lang.Object\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Object\"></xref> \\-> empty JSON object (`{}`)\n * All other values use the `toString` value with <xref uid=\"com.azure.json.JsonWriter.writeString(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeString(String)\"></xref>"
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.json.JsonWriter.writeUntypedField(java.lang.String,java.lang.Object)"
fullName: "com.azure.json.JsonWriter.writeUntypedField(String fieldName, Object value)"
name: "writeUntypedField(String fieldName, Object value)"
nameWithType: "JsonWriter.writeUntypedField(String fieldName, Object value)"
summary: "Writes the unknown type `value` field."
parameters:
- description: "The field name."
name: "fieldName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The value to write."
name: "value"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
syntax: "public JsonWriter writeUntypedField(String fieldName, Object value)"
exceptions:
- description: "If <code>fieldName</code> is null."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Writes the unknown type `value` field.\n\nThe following is how each `value` is handled (in this order):\n\n * null -> <xref uid=\"com.azure.json.JsonWriter.writeNull()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeNull()\"></xref>\n * `short` \\-> <xref uid=\"com.azure.json.JsonWriter.writeInt(int)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeInt(int)\"></xref>\n * `int` \\-> <xref uid=\"com.azure.json.JsonWriter.writeInt(int)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeInt(int)\"></xref>\n * `long` \\-> <xref uid=\"com.azure.json.JsonWriter.writeLong(long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeLong(long)\"></xref>\n * `float` \\-> <xref uid=\"com.azure.json.JsonWriter.writeFloat(float)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeFloat(float)\"></xref>\n * `double` \\-> <xref uid=\"com.azure.json.JsonWriter.writeDouble(double)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeDouble(double)\"></xref>\n * `boolean` \\-> <xref uid=\"com.azure.json.JsonWriter.writeBoolean(boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeBoolean(boolean)\"></xref>\n * <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CharSequence\"></xref> \\-> <xref uid=\"com.azure.json.JsonWriter.writeString(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeString(String)\"></xref>\n * `char` \\-> <xref uid=\"com.azure.json.JsonWriter.writeString(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeString(String)\"></xref>\n * <xref uid=\"com.azure.json.JsonSerializable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonSerializable\"></xref> \\-> <xref uid=\"com.azure.json.JsonWriter.writeJson(com.azure.json.JsonSerializable<?>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeJson(JsonSerializable)\"></xref>\n * `Object[]` \\-> <xref uid=\"com.azure.json.JsonWriter.writeUntyped(java.lang.Object)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeUntyped(Object)\"></xref> for each element\n * <xref uid=\"java.lang.Iterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Iterable\"></xref> \\-> <xref uid=\"com.azure.json.JsonWriter.writeUntyped(java.lang.Object)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeUntyped(Object)\"></xref> for each element\n * <xref uid=\"java.util.Map\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Map\"></xref> \\-> <xref uid=\"com.azure.json.JsonWriter.writeUntyped(java.lang.Object)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeUntyped(Object)\"></xref> for each element where the key to `toString`'d\n * <xref uid=\"java.lang.Object\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Object\"></xref> \\-> empty JSON object (`{}`)\n * All other values use the `toString` value with <xref uid=\"com.azure.json.JsonWriter.writeString(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#writeString(String)\"></xref>"
returns:
description: "The updated JsonWriter object."
type: "<xref href=\"com.azure.json.JsonWriter?alt=com.azure.json.JsonWriter&text=JsonWriter\" data-throw-if-not-resolved=\"False\" />"
type: "class"
desc: "Writes a JSON value as a stream of tokens.\n\nInstances of <xref uid=\"com.azure.json.JsonWriter\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonWriter\"></xref> are created using an instance of <xref uid=\"com.azure.json.JsonProvider\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonProvider\"></xref> or using the utility methods in <xref uid=\"com.azure.json.JsonProviders\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonProviders\"></xref>."
implements:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html\">Closeable</a>"
metadata: {}
package: "com.azure.json"
artifact: com.azure:azure-json:1.3.0