Package io.github.qishr.cascara.lang.yaml.processor
Class YamlSerializer
java.lang.Object
io.github.qishr.cascara.lang.yaml.processor.AbstractYamlProcessor<io.github.qishr.cascara.lang.yaml.processor.YamlSerializer>
io.github.qishr.cascara.lang.yaml.processor.YamlSerializer
All Implemented Interfaces:
Serializer<YamlNode>
public class YamlSerializer
extends AbstractYamlProcessor<YamlSerializer>
Standard implementation for YAML serialization.
Constructor Summary
| Constructor | Description |
|---|---|
| YamlSerializer() |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| protected YamlSerializer | self() | |
| public YamlSerializer | setReporter(Reporter reporter) | |
| public String | toText(Object object) | |
| public C | fromText(String text, Class |
|
| public YamlNode | toAst(Object object) | |
| public C | fromAst(YamlNode astNode, Class |
|
| public T | performMapping(YamlNode yaml, Class |
Converts a Yaml AST structure back into a Java object of the specified type. |
Methods inherited from AbstractYamlProcessor
getContentType, setOptions, getServiceProperties
Method Details
self
protected YamlSerializer self()
setReporter
public YamlSerializer setReporter(Reporter reporter)
toText
public String toText(Object object)
Specified By:
fromText
public C fromText(String text, Class
Specified By:
toAst
public YamlNode toAst(Object object)
Specified By:
fromAst
public C fromAst(YamlNode astNode, Class
performMapping
public T performMapping(YamlNode yaml, Class
Converts a Yaml AST structure back into a Java object of the specified type.
Throws: