org.jenkinsci.plugins.uithemes.util
Class JSONReadWrite
java.lang.Object
org.jenkinsci.plugins.uithemes.util.JSONReadWrite
public class JSONReadWrite
- extends Object
- Author:
- tom.fennelly@gmail.com
|
Field Summary |
static com.fasterxml.jackson.databind.ObjectMapper |
jsonMapper
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
jsonMapper
public static final com.fasterxml.jackson.databind.ObjectMapper jsonMapper
JSONReadWrite
public JSONReadWrite()
fromString
public static <T> T fromString(String string,
Class<T> to)
throws IOException
- Throws:
IOException
fromBytes
public static <T> T fromBytes(byte[] bytes,
Charset encoding,
Class<T> to)
throws IOException
- Throws:
IOException
fromUTF8File
public static <T> T fromUTF8File(File file,
Class<T> to)
throws IOException
- Throws:
IOException
fromRequest
public static <T> T fromRequest(org.kohsuke.stapler.StaplerRequest req,
Class<T> to)
throws IOException
- Throws:
IOException
toString
public static String toString(Object object)
throws IOException
- Throws:
IOException
toUTF8Bytes
public static byte[] toUTF8Bytes(Object object)
throws IOException
- Throws:
IOException
toUTF8File
public static void toUTF8File(Object object,
File file)
throws IOException
- Throws:
IOException
Copyright © 2004-2015. All Rights Reserved.