Share via


JsonWriteSettings Class

public final class JsonWriteSettings
extends FormatWriteSettings

Json write settings.

Constructor Summary

Constructor Description
JsonWriteSettings()

Creates an instance of JsonWriteSettings class.

Method Summary

Modifier and Type Method and Description
Object filePattern()

Get the filePattern property: File pattern of JSON.

static JsonWriteSettings fromJson(JsonReader jsonReader)

Reads an instance of JsonWriteSettings from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The write setting type.

JsonWriteSettings withFilePattern(Object filePattern)

Set the filePattern property: File pattern of JSON.

Methods inherited from FormatWriteSettings

Methods inherited from java.lang.Object

Constructor Details

JsonWriteSettings

public JsonWriteSettings()

Creates an instance of JsonWriteSettings class.

Method Details

filePattern

public Object filePattern()

Get the filePattern property: File pattern of JSON. This setting controls the way a collection of JSON objects will be treated. The default value is 'setOfObjects'. It is case-sensitive.

Returns:

the filePattern value.

fromJson

public static JsonWriteSettings fromJson(JsonReader jsonReader)

Reads an instance of JsonWriteSettings from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of JsonWriteSettings if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the JsonWriteSettings.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

JsonWriteSettings.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The write setting type.

Overrides:

JsonWriteSettings.type()

Returns:

the type value.

withFilePattern

public JsonWriteSettings withFilePattern(Object filePattern)

Set the filePattern property: File pattern of JSON. This setting controls the way a collection of JSON objects will be treated. The default value is 'setOfObjects'. It is case-sensitive.

Parameters:

filePattern - the filePattern value to set.

Returns:

the JsonWriteSettings object itself.

Applies to