Package io.github.qishr.cascara.lang.yaml
Class CascaraYaml
java.lang.Object
io.github.qishr.cascara.lang.yaml.CascaraYaml
public final class CascaraYaml
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| public static YamlSerializer | newSerializer() | Create a new JSON serializer instance. |
| public static T | read(String text, Class |
Read JSON text into a JVM object of the given type. |
| public static T | read(String text, TypeReference |
Read JSON text using a generic type reference. |
| public static T | read(Reader reader, Class |
Read JSON from a Reader into a JVM object. |
| public static T | read(Reader reader, TypeReference |
Read JSON from a Reader using a generic type reference. |
| public static T | read(InputStream is, Class |
Read JSON from an InputStream into a JVM object. |
| public static T | read(InputStream is, TypeReference |
Read JSON from an InputStream using a generic type reference. |
| public static String | write(Object value) | Write a JVM object to JSON text. |
| public static void | write(Object value, Writer writer) | Write a JVM object to a Writer as JSON. |
| public static YamlNode | toAst(Object value) | Convert a JVM object into a JSON AST node. |
| public static T | fromAst(YamlNode ast, Class |
Convert a JSON AST node into a JVM object. |
| public static T | fromAst(YamlNode ast, TypeReference |
Convert a JSON AST node using a generic type reference. |
| public static SemVer | getVersion() | Return the version of Cascara YAML. |
Method Details
newSerializer
public static YamlSerializer newSerializer()
Create a new JSON serializer instance.
read
public static T read(String text, Class
Read JSON text into a JVM object of the given type.
read
public static T read(String text, TypeReference
Read JSON text using a generic type reference.
read
public static T read(Reader reader, Class
Read JSON from a Reader into a JVM object.
read
public static T read(Reader reader, TypeReference
Read JSON from a Reader using a generic type reference.
read
public static T read(InputStream is, Class
Read JSON from an InputStream into a JVM object.
read
public static T read(InputStream is, TypeReference
Read JSON from an InputStream using a generic type reference.
write
public static String write(Object value)
Write a JVM object to JSON text.
write
public static void write(Object value, Writer writer)
Write a JVM object to a Writer as JSON.
Throws:
toAst
public static YamlNode toAst(Object value)
Convert a JVM object into a JSON AST node.
fromAst
public static T fromAst(YamlNode ast, Class
Convert a JSON AST node into a JVM object.
fromAst
public static T fromAst(YamlNode ast, TypeReference
Convert a JSON AST node using a generic type reference.
getVersion
public static SemVer getVersion()
Return the version of Cascara YAML.