Class MarshallUtils
Designed for use with static imports to allow concise serialization code without explicitly referencing marshaller classes.
Examples:
See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TParses BSON bytes to the specified Java type.static <T> TParses BSON bytes to the specified parameterized Java type.static byte[]Serializes a Java object to BSON bytes.static <T> TParses a BSON input to the specified Java type.static ObjectSerializes a Java object to the specified BSON output.static <T> TParses a BSON input to the specified parameterized Java type.static <T> TParses CBOR bytes to the specified Java type.static <T> TParses CBOR bytes to the specified parameterized Java type.static byte[]Serializes a Java object to CBOR bytes.static <T> TParses a CBOR input to the specified Java type.static ObjectSerializes a Java object to the specified CBOR output.static <T> TParses a CBOR input to the specified parameterized Java type.static StringSerializes a Java object to a CSV string.static <T> TParses a CSV input to the specified Java type.static ObjectSerializes a Java object to the specified CSV output.static <T> TParses a CSV input to the specified parameterized Java type.static <T> TParses a CSV string to the specified Java type.static <T> TParses a CSV string to the specified parameterized Java type.static StringSerializes a Java object to an HJSON string.static <T> TParses an HJSON input to the specified Java type.static ObjectSerializes a Java object to the specified HJSON output.static <T> TParses an HJSON input to the specified parameterized Java type.static <T> TParses an HJSON string to the specified Java type.static <T> TParses an HJSON string to the specified parameterized Java type.static StringSerializes a Java object to a HOCON string.static <T> TParses a HOCON input to the specified Java type.static ObjectSerializes a Java object to the specified HOCON output.static <T> TParses a HOCON input to the specified parameterized Java type.static <T> TParses a HOCON string to the specified Java type.static <T> TParses a HOCON string to the specified parameterized Java type.static StringSerializes a Java object to an HTML string.static <T> TParses an HTML input to the specified Java type.static ObjectSerializes a Java object to the specified HTML output.static <T> TParses an HTML input to the specified parameterized Java type.static <T> TParses an HTML string to the specified Java type.static <T> TParses an HTML string to the specified parameterized Java type.static StringSerializes a Java object to an INI/properties string.static <T> TParses an INI/properties input to the specified Java type.static ObjectSerializes a Java object to the specified INI/properties output.static <T> TParses an INI/properties input to the specified parameterized Java type.static <T> TParses an INI/properties string to the specified Java type.static <T> TParses an INI/properties string to the specified parameterized Java type.static StringSerializes a Java object to a canonical JSON string (RFC 8785).static <T> TParses a canonical JSON input to the specified Java type.static ObjectSerializes a Java object to the specified canonical JSON output.static <T> TParses a canonical JSON input to the specified parameterized Java type.static <T> TParses a canonical JSON string (RFC 8785) to the specified Java type.static <T> TParses a canonical JSON string (RFC 8785) to the specified parameterized Java type.static StringSerializes a Java object to a JSON string.static <T> TParses a JSON input to the specified Java type.static ObjectSerializes a Java object to the specified JSON output.static <T> TParses a JSON input to the specified parameterized Java type.static <T> TParses a JSON string to the specified Java type.static <T> TParses a JSON string to the specified parameterized Java type.static StringSerializes a Java object to a JSON5 string.static <T> TParses a JSON5 input to the specified Java type.static ObjectSerializes a Java object to the specified JSON5 output.static <T> TParses a JSON5 input to the specified parameterized Java type.static <T> TParses a JSON5 string to the specified Java type.static <T> TParses a JSON5 string to the specified parameterized Java type.static StringSerializes a Java object to a JSON Lines string.static <T> TParses a JSON Lines input to the specified Java type.static ObjectSerializes a Java object to the specified JSON Lines output.static <T> TParses a JSON Lines input to the specified parameterized Java type.static <T> TParses a JSON Lines string to the specified Java type.static <T> TParses a JSON Lines string to the specified parameterized Java type.static StringSerializes a Java object to an inline Markdown string.static <T> TParses a Markdown input to the specified Java type.static ObjectSerializes a Java object to the specified Markdown output.static <T> TParses a Markdown input to the specified parameterized Java type.static <T> TParses an inline Markdown string to the specified Java type.static <T> TParses an inline Markdown string to the specified parameterized Java type.static StringmarkdownDoc(Object object) Serializes a Java object to a document-mode Markdown string (headings + tables).static <T> TmarkdownDoc(Object input, Class<T> type) Parses a document-mode Markdown input to the specified Java type.static ObjectmarkdownDoc(Object object, Object output) Serializes a Java object to the specified document-mode Markdown output.static <T> TmarkdownDoc(Object input, Type type, Type... args) Parses a document-mode Markdown input to the specified parameterized Java type.static <T> TmarkdownDoc(String o, Class<T> c) Parses a document-mode Markdown string to the specified Java type.static <T> TmarkdownDoc(String input, Type type, Type... args) Parses a document-mode Markdown string to the specified parameterized Java type.static <T> TParses MessagePack bytes to the specified Java type.static <T> TParses MessagePack bytes to the specified parameterized Java type.static byte[]Serializes a Java object to MessagePack bytes.static <T> TParses a MessagePack input to the specified Java type.static ObjectSerializes a Java object to the specified MessagePack output.static <T> TParses a MessagePack input to the specified parameterized Java type.static StringSerializes a Java object to an OpenAPI string.static <T> TParses an OpenAPI input to the specified Java type.static ObjectSerializes a Java object to the specified OpenAPI output.static <T> TParses an OpenAPI input to the specified parameterized Java type.static <T> TParses an OpenAPI string to the specified Java type.static <T> TParses an OpenAPI string to the specified parameterized Java type.static <T> List<T>Parses Apache Parquet bytes to a list of the specified Java type.static <T> List<T>Parses Apache Parquet bytes to a list of the specified element type.static <T> TParses Apache Parquet bytes to the specified parameterized Java type.static byte[]Serializes a Java object to Apache Parquet bytes.static <T> List<T>Parses a Parquet input to a list of the specified Java type.static ObjectSerializes a Java object to the specified Parquet output.static StringSerializes a Java object to a plain-text string.static <T> TParses a plain-text input to the specified Java type.static ObjectSerializes a Java object to the specified plain-text output.static <T> TParses a plain-text input to the specified parameterized Java type.static <T> TParses a plain-text string to the specified Java type.static <T> TParses a plain-text string to the specified parameterized Java type.static StringSerializes a Java object to a Protocol Buffers text string.static <T> TParses a Protocol Buffers input to the specified Java type.static ObjectSerializes a Java object to the specified Protocol Buffers output.static <T> TParses a Protocol Buffers input to the specified parameterized Java type.static <T> TParses a Protocol Buffers text string to the specified Java type.static <T> TParses a Protocol Buffers text string to the specified parameterized Java type.static StringSerializes a Java object to a TOML string.static <T> TParses a TOML input to the specified Java type.static ObjectSerializes a Java object to the specified TOML output.static <T> TParses a TOML input to the specified parameterized Java type.static <T> TParses a TOML string to the specified Java type.static <T> TParses a TOML string to the specified parameterized Java type.static StringSerializes a Java object to a UON string.static <T> TParses a UON input to the specified Java type.static ObjectSerializes a Java object to the specified UON output.static <T> TParses a UON input to the specified parameterized Java type.static <T> TParses a UON string to the specified Java type.static <T> TParses a UON string to the specified parameterized Java type.static StringurlEncoding(Object object) Serializes a Java object to a URL-encoding string.static <T> TurlEncoding(Object input, Class<T> type) Parses a URL-encoding input to the specified Java type.static ObjecturlEncoding(Object object, Object output) Serializes a Java object to the specified URL-encoding output.static <T> TurlEncoding(Object input, Type type, Type... args) Parses a URL-encoding input to the specified parameterized Java type.static <T> TurlEncoding(String o, Class<T> c) Parses a URL-encoding string to the specified Java type.static <T> TurlEncoding(String input, Type type, Type... args) Parses a URL-encoding string to the specified parameterized Java type.static StringSerializes a Java object to an XML string.static <T> TParses an XML input to the specified Java type.static ObjectSerializes a Java object to the specified XML output.static <T> TParses an XML input to the specified parameterized Java type.static <T> TParses an XML string to the specified Java type.static <T> TParses an XML string to the specified parameterized Java type.static StringSerializes a Java object to a YAML string.static <T> TParses a YAML input to the specified Java type.static ObjectSerializes a Java object to the specified YAML output.static <T> TParses a YAML input to the specified parameterized Java type.static <T> TParses a YAML string to the specified Java type.static <T> TParses a YAML string to the specified parameterized Java type.
-
Method Details
-
json
Serializes a Java object to a JSON string.A shortcut for calling
Json. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
json
Serializes a Java object to the specified JSON output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
json
Parses a JSON input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
json
Parses a JSON input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
json
Parses a JSON string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The JSON input string.c- The object type to create.- Returns:
- The parsed object.
-
json
Parses a JSON string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The JSON input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
json5
Serializes a Java object to a JSON5 string.A shortcut for calling
Json5. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
json5
Serializes a Java object to the specified JSON5 output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
json5
Parses a JSON5 input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
json5
Parses a JSON5 input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
json5
Parses a JSON5 string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The JSON5 input string.c- The object type to create.- Returns:
- The parsed object.
-
json5
Parses a JSON5 string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The JSON5 input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
jsonl
Serializes a Java object to a JSON Lines string.A shortcut for calling
Jsonl. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
jsonl
Serializes a Java object to the specified JSON Lines output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
jsonl
Parses a JSON Lines input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
jsonl
Parses a JSON Lines input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
jsonl
Parses a JSON Lines string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The JSON Lines input string.c- The object type to create.- Returns:
- The parsed object.
-
jsonl
Parses a JSON Lines string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The JSON Lines input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
jcs
Serializes a Java object to a canonical JSON string (RFC 8785).A shortcut for calling
Jcs. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
jcs
Serializes a Java object to the specified canonical JSON output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
jcs
Parses a canonical JSON input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
jcs
Parses a canonical JSON input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
jcs
Parses a canonical JSON string (RFC 8785) to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The JCS input string.c- The object type to create.- Returns:
- The parsed object.
-
jcs
Parses a canonical JSON string (RFC 8785) to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The JCS input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
hjson
Serializes a Java object to an HJSON string.A shortcut for calling
Hjson. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
hjson
Serializes a Java object to the specified HJSON output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
hjson
Parses an HJSON input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
hjson
Parses an HJSON input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
hjson
Parses an HJSON string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The HJSON input string.c- The object type to create.- Returns:
- The parsed object.
-
hjson
Parses an HJSON string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The HJSON input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
xml
Serializes a Java object to an XML string.A shortcut for calling
Xml. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
xml
Serializes a Java object to the specified XML output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
xml
Parses an XML input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
xml
Parses an XML input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
xml
Parses an XML string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The XML input string.c- The object type to create.- Returns:
- The parsed object.
-
xml
Parses an XML string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The XML input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
html
Serializes a Java object to an HTML string.A shortcut for calling
Html. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
html
Serializes a Java object to the specified HTML output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
html
Parses an HTML input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
html
Parses an HTML input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
html
Parses an HTML string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The HTML input string.c- The object type to create.- Returns:
- The parsed object.
-
html
Parses an HTML string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The HTML input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
uon
Serializes a Java object to a UON string.A shortcut for calling
Uon. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
uon
Serializes a Java object to the specified UON output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
uon
Parses a UON input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
uon
Parses a UON input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
uon
Parses a UON string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The UON input string.c- The object type to create.- Returns:
- The parsed object.
-
uon
Parses a UON string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The UON input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
urlEncoding
Serializes a Java object to a URL-encoding string.A shortcut for calling
UrlEncoding. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
urlEncoding
public static Object urlEncoding(Object object, Object output) throws SerializeException, IOException Serializes a Java object to the specified URL-encoding output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
urlEncoding
Parses a URL-encoding input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
urlEncoding
public static <T> T urlEncoding(Object input, Type type, Type... args) throws ParseException, IOException Parses a URL-encoding input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
urlEncoding
Parses a URL-encoding string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The URL-encoding input string.c- The object type to create.- Returns:
- The parsed object.
-
urlEncoding
Parses a URL-encoding string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The URL-encoding input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
yaml
Serializes a Java object to a YAML string.A shortcut for calling
Yaml. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
yaml
Serializes a Java object to the specified YAML output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
yaml
Parses a YAML input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
yaml
Parses a YAML input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
yaml
Parses a YAML string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The YAML input string.c- The object type to create.- Returns:
- The parsed object.
-
yaml
Parses a YAML string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The YAML input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
csv
Serializes a Java object to a CSV string.A shortcut for calling
Csv. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
csv
Serializes a Java object to the specified CSV output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
csv
Parses a CSV input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
csv
Parses a CSV input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
csv
Parses a CSV string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The CSV input string.c- The object type to create.- Returns:
- The parsed object.
-
csv
Parses a CSV string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The CSV input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
openApi
Serializes a Java object to an OpenAPI string.A shortcut for calling
OpenApi. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
openApi
Serializes a Java object to the specified OpenAPI output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
openApi
Parses an OpenAPI input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
openApi
public static <T> T openApi(Object input, Type type, Type... args) throws ParseException, IOException Parses an OpenAPI input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
openApi
Parses an OpenAPI string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The OpenAPI input string.c- The object type to create.- Returns:
- The parsed object.
-
openApi
Parses an OpenAPI string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The OpenAPI input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
plainText
Serializes a Java object to a plain-text string.A shortcut for calling
PlainText. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
plainText
Serializes a Java object to the specified plain-text output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
plainText
Parses a plain-text input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
plainText
public static <T> T plainText(Object input, Type type, Type... args) throws ParseException, IOException Parses a plain-text input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
plainText
Parses a plain-text string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The plain-text input string.c- The object type to create.- Returns:
- The parsed object.
-
plainText
Parses a plain-text string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The plain-text input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
markdown
Serializes a Java object to an inline Markdown string.A shortcut for calling
Markdown. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
markdown
Serializes a Java object to the specified Markdown output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
markdown
Parses a Markdown input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
markdown
public static <T> T markdown(Object input, Type type, Type... args) throws ParseException, IOException Parses a Markdown input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
markdown
Parses an inline Markdown string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The Markdown input string.c- The object type to create.- Returns:
- The parsed object.
-
markdown
Parses an inline Markdown string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The Markdown input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
markdownDoc
Serializes a Java object to a document-mode Markdown string (headings + tables).A shortcut for calling
MarkdownDoc. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
markdownDoc
public static Object markdownDoc(Object object, Object output) throws SerializeException, IOException Serializes a Java object to the specified document-mode Markdown output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
markdownDoc
Parses a document-mode Markdown input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
markdownDoc
public static <T> T markdownDoc(Object input, Type type, Type... args) throws ParseException, IOException Parses a document-mode Markdown input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
markdownDoc
Parses a document-mode Markdown string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The Markdown input string.c- The object type to create.- Returns:
- The parsed object.
-
markdownDoc
Parses a document-mode Markdown string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The Markdown input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
ini
Serializes a Java object to an INI/properties string.A shortcut for calling
Ini. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
ini
Serializes a Java object to the specified INI/properties output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
ini
Parses an INI/properties input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
ini
Parses an INI/properties input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
ini
Parses an INI/properties string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The INI input string.c- The object type to create.- Returns:
- The parsed object.
-
ini
Parses an INI/properties string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The INI input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
toml
Serializes a Java object to a TOML string.A shortcut for calling
Toml. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
toml
Serializes a Java object to the specified TOML output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
toml
Parses a TOML input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
toml
Parses a TOML input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
toml
Parses a TOML string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The TOML input string.c- The object type to create.- Returns:
- The parsed object.
-
toml
Parses a TOML string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The TOML input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
hocon
Serializes a Java object to a HOCON string.A shortcut for calling
Hocon. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
hocon
Serializes a Java object to the specified HOCON output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
hocon
Parses a HOCON input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
hocon
Parses a HOCON input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
hocon
Parses a HOCON string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The HOCON input string.c- The object type to create.- Returns:
- The parsed object.
-
hocon
Parses a HOCON string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The HOCON input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
proto
Serializes a Java object to a Protocol Buffers text string.A shortcut for calling
Prototext. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
proto
Serializes a Java object to the specified Protocol Buffers output.- Parameters:
object- The object to serialize.output- The output object (Writer, OutputStream, File, or StringBuilder).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
proto
Parses a Protocol Buffers input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
proto
Parses a Protocol Buffers input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (Reader, CharSequence, InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
proto
Parses a Protocol Buffers text string to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The Prototext input string.c- The object type to create.- Returns:
- The parsed object.
-
proto
Parses a Protocol Buffers text string to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The Prototext input string.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
msgPack
Serializes a Java object to MessagePack bytes.A shortcut for calling
MsgPack. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
msgPack
Serializes a Java object to the specified MessagePack output.- Parameters:
object- The object to serialize.output- The output object (OutputStream or File).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
msgPack
Parses a MessagePack input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
msgPack
public static <T> T msgPack(Object input, Type type, Type... args) throws ParseException, IOException Parses a MessagePack input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
msgPack
Parses MessagePack bytes to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The MessagePack input bytes.c- The object type to create.- Returns:
- The parsed object.
-
msgPack
Parses MessagePack bytes to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The MessagePack input bytes.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
cbor
Serializes a Java object to CBOR bytes.A shortcut for calling
Cbor. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
cbor
Serializes a Java object to the specified CBOR output.- Parameters:
object- The object to serialize.output- The output object (OutputStream or File).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
cbor
Parses a CBOR input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
cbor
Parses a CBOR input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
cbor
Parses CBOR bytes to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The CBOR input bytes.c- The object type to create.- Returns:
- The parsed object.
-
cbor
Parses CBOR bytes to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The CBOR input bytes.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
bson
Serializes a Java object to BSON bytes.A shortcut for calling
Bson. .of (object )- Parameters:
object- The object to serialize.- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
bson
Serializes a Java object to the specified BSON output.- Parameters:
object- The object to serialize.output- The output object (OutputStream or File).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
bson
Parses a BSON input to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (InputStream, byte[], or File).type- The object type to create.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
bson
Parses a BSON input to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The input (InputStream, byte[], or File).type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
bson
Parses BSON bytes to the specified Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
o- The BSON input bytes.c- The object type to create.- Returns:
- The parsed object.
-
bson
Parses BSON bytes to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The BSON input bytes.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-
parquet
Serializes a Java object to Apache Parquet bytes.A shortcut for calling
Parquet. .of (object )Note: Parquet is collection-oriented. A single bean is automatically wrapped in a one-element list.
- Parameters:
object- The object to serialize (Collection, array, or single bean).- Returns:
- The serialized object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.
-
parquet
Serializes a Java object to the specified Parquet output.- Parameters:
object- The object to serialize.output- The output object (OutputStream or File).- Returns:
- The output object.
- Throws:
SerializeException- If a problem occurred trying to convert the output.IOException- Thrown by underlying stream.
-
parquet
Parses a Parquet input to a list of the specified Java type.Note: Parquet always returns a
List; the parser never returns a bare instance.- Type Parameters:
T- The element type.- Parameters:
input- The input (InputStream, byte[], or File).type- The bean class (parser returnsList<T>).- Returns:
- The parsed list of beans.
- Throws:
ParseException- Malformed input encountered.IOException- Thrown by underlying stream.
-
parquet
Parses Apache Parquet bytes to a list of the specified Java type.Note: Parquet always returns a
List; the parser never returns a bare instance.- Type Parameters:
T- The element type.- Parameters:
o- The Parquet input bytes.c- The bean class (parser returnsList<T>).- Returns:
- The parsed list of beans.
-
parquet
Parses Apache Parquet bytes to a list of the specified element type.- Type Parameters:
T- The element type.- Parameters:
input- The Parquet input bytes.type- The element type (parser returnsList<T>).- Returns:
- The parsed list.
- Throws:
ParseException- Malformed input encountered.
-
parquet
Parses Apache Parquet bytes to the specified parameterized Java type.- Type Parameters:
T- The class type of the object being created.- Parameters:
input- The Parquet input bytes.type- The object type to create.args- The type arguments of the class if it's a collection or map.- Returns:
- The parsed object.
- Throws:
ParseException- Malformed input encountered.
-