Package org.opennms.core.test.xml
Class JsonTest
- java.lang.Object
-
- org.opennms.core.test.xml.JsonTest
-
public final class JsonTest extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assertJsonEquals(String expected, String actual)
static <T> String
marshalToJson(T object)
static String
read(InputStream inputStream)
static <T> T
unmarshalFromJson(String json, Class<T> expectedResultType)
-
-
-
Method Detail
-
marshalToJson
public static <T> String marshalToJson(T object) throws IOException
- Throws:
IOException
-
unmarshalFromJson
public static <T> T unmarshalFromJson(String json, Class<T> expectedResultType) throws IOException
- Throws:
IOException
-
read
public static String read(InputStream inputStream) throws IOException
- Throws:
IOException
-
-