Skip to content

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 clazz)
public YamlNode toAst(Object object)
public C fromAst(YamlNode astNode, Class clazz)
public T performMapping(YamlNode yaml, Class clazz) 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:

Serializer


fromText

public C fromText(String text, Class clazz)

Specified By:

Serializer


toAst

public YamlNode toAst(Object object)

Specified By:

Serializer


fromAst

public C fromAst(YamlNode astNode, Class clazz)


performMapping

public T performMapping(YamlNode yaml, Class clazz)

Converts a Yaml AST structure back into a Java object of the specified type.

Throws:

YamlSerializerException