public class MarkupHelper extends Object
| Constructor and Description |
|---|
MarkupHelper() |
| Modifier and Type | Method and Description |
|---|---|
protected static com.fasterxml.jackson.databind.ObjectMapper |
createPrettyJsonObjectMapper() |
static com.fasterxml.jackson.databind.ObjectMapper |
createYamlObjectMapper() |
static com.fasterxml.jackson.databind.JsonNode |
loadJson(File file) |
static <T> T |
loadYaml(byte[] data,
Class<T> clazz)
Loads the YAML file for the given DTO class
|
static <T> T |
loadYaml(File file,
Class<T> clazz)
Loads the YAML for the given DTO class
|
static <T> T |
loadYaml(InputStream in,
Class<T> clazz)
Loads the YAML file for the given DTO class
|
static <T> T |
loadYaml(String text,
Class<T> clazz)
Loads the YAML text for the given DTO class
|
static <T> T |
loadYaml(URL src,
Class<T> clazz)
Loads the YAML for the given DTO class
|
static void |
savePrettyJson(File file,
Object value) |
static void |
saveYaml(Object data,
File file) |
static void |
saveYaml(Object data,
FileObject fileObject) |
static String |
toJson(Object dto) |
static String |
toPrettyJson(Object dto) |
static String |
toYaml(Object data) |
public static com.fasterxml.jackson.databind.ObjectMapper createYamlObjectMapper()
public static String toJson(Object dto) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic static String toPrettyJson(Object dto) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionprotected static com.fasterxml.jackson.databind.ObjectMapper createPrettyJsonObjectMapper()
public static <T> T loadYaml(File file, Class<T> clazz) throws IOException
IOExceptionpublic static <T> T loadYaml(URL src, Class<T> clazz) throws IOException
IOExceptionpublic static <T> T loadYaml(InputStream in, Class<T> clazz) throws IOException
IOExceptionpublic static <T> T loadYaml(String text, Class<T> clazz) throws IOException
IOExceptionpublic static <T> T loadYaml(byte[] data,
Class<T> clazz)
throws IOException
IOExceptionpublic static void saveYaml(Object data, File file) throws IOException
IOExceptionpublic static void saveYaml(Object data, FileObject fileObject) throws IOException
IOExceptionpublic static String toYaml(Object data) throws IOException
IOExceptionpublic static com.fasterxml.jackson.databind.JsonNode loadJson(File file) throws IOException
IOExceptionpublic static void savePrettyJson(File file, Object value) throws IOException
IOExceptionCopyright © 2076–2017 Red Hat. All rights reserved.