Package valorless.valorlessutils.json
Class CompactYamlRepresenter
java.lang.Object
org.yaml.snakeyaml.representer.BaseRepresenter
org.yaml.snakeyaml.representer.Representer
org.bukkit.configuration.file.YamlRepresenter
valorless.valorlessutils.json.CompactYamlRepresenter
public class CompactYamlRepresenter
extends org.bukkit.configuration.file.YamlRepresenter
There are situations in which SnakeYaml uses the literal block style by default and thereby
 produces output with line breaks. This includes for example:
 
- Strings that contain non-printable characters and are therefore considered to be binary data.
- Strings and characters that contain newline characters when the used scalar style is
 DumperOptions.ScalarStyle.PLAIN.
- Byte arrays, which are also considered binary data.
- Custom representers may also decide to forcefully use block styles.
 For our compact Yaml representation we want to produce Yaml output without any line breaks in all
 situations. This Representer therefore enforces the use of the scalar style
 DumperOptions.ScalarStyle.DOUBLE_QUOTED for any scalars that contain newline characters.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.yaml.snakeyaml.representer.Representerorg.yaml.snakeyaml.representer.Representer.RepresentJavaBean
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected org.yaml.snakeyaml.DumperOptions.NonPrintableStyleprotected TimeZoneFields inherited from class org.yaml.snakeyaml.representer.RepresentertypeDefinitionsFields inherited from class org.yaml.snakeyaml.representer.BaseRepresenterdefaultFlowStyle, defaultScalarStyle, multiRepresenters, nullRepresenter, objectToRepresent, representedObjects, representers
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionorg.yaml.snakeyaml.nodes.TagaddClassTag(Class<? extends Object> arg0, org.yaml.snakeyaml.nodes.Tag arg1) protected org.yaml.snakeyaml.nodes.Tagprotected org.yaml.snakeyaml.nodes.NoderepresentScalar(@Nullable org.yaml.snakeyaml.nodes.Tag tag, @Nullable String value, @Nullable org.yaml.snakeyaml.DumperOptions.ScalarStyle style) voidsetTimeZone(TimeZone arg0) Methods inherited from class org.yaml.snakeyaml.representer.RepresenteraddTypeDescription, checkGlobalTag, getProperties, representJavaBean, representJavaBeanProperty, setPropertyUtilsMethods inherited from class org.yaml.snakeyaml.representer.BaseRepresentergetDefaultFlowStyle, getDefaultScalarStyle, getPropertyUtils, isExplicitPropertyUtils, represent, representData, representMapping, representScalar, representSequence, setDefaultFlowStyle, setDefaultScalarStyle
- 
Field Details- 
classTags
- 
timeZone
- 
nonPrintableStyleprotected org.yaml.snakeyaml.DumperOptions.NonPrintableStyle nonPrintableStyle
 
- 
- 
Constructor Details- 
CompactYamlRepresenterpublic CompactYamlRepresenter()
 
- 
- 
Method Details- 
representScalarprotected org.yaml.snakeyaml.nodes.Node representScalar(@Nullable org.yaml.snakeyaml.nodes.Tag tag, @Nullable String value, @Nullable org.yaml.snakeyaml.DumperOptions.ScalarStyle style) - Overrides:
- representScalarin class- org.yaml.snakeyaml.representer.BaseRepresenter
 
- 
getTag
- 
addClassTag
- 
getTimeZone
- 
setTimeZone
 
-