|
Log4j 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.psnc.expres.model.util.JsonReaderHelper
public class JsonReaderHelper
JsonReaderHelper
class - used to load and parse json format resources
Constructor Summary | |
---|---|
JsonReaderHelper()
|
Method Summary | |
---|---|
static java.lang.String |
jsonToString(java.lang.Object javaObject,
boolean pretty)
Convert pojo object to JSON representation |
static java.lang.Object |
load(java.io.File fileName,
java.lang.Class<?> resourceMapper)
Load json resource and map it to the given java object (resource mapper) |
static java.lang.Object |
load(java.io.InputStream input,
java.lang.Class<?> resourceMapper)
Load json resource and map it to the given java object (resource mapper) |
static java.lang.Object |
load(java.lang.String fileName,
java.lang.Class<?> resourceMapper)
Load json resource and map it to the given java object (resource mapper) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JsonReaderHelper()
Method Detail |
---|
public static java.lang.Object load(java.io.File fileName, java.lang.Class<?> resourceMapper) throws pl.psnc.vlab.exception.ResourceNotFoundException
fileName
- File object representing a Json file with resource
descriptionresourceMapper
- java class which will be used to map json to java
object
pl.psnc.vlab.exception.ResourceNotFoundException
public static java.lang.Object load(java.lang.String fileName, java.lang.Class<?> resourceMapper) throws pl.psnc.vlab.exception.ResourceNotFoundException
fileName
- file containing json resourceresourceMapper
- java class which will be used to map json to java
object
pl.psnc.vlab.exception.ResourceNotFoundException
public static java.lang.Object load(java.io.InputStream input, java.lang.Class<?> resourceMapper) throws pl.psnc.vlab.exception.ResourceNotFoundException
input
- input stream with json resourceresourceMapper
- java class which will be used to map json to java
object
pl.psnc.vlab.exception.ResourceNotFoundException
public static java.lang.String jsonToString(java.lang.Object javaObject, boolean pretty) throws com.sdicons.json.mapper.MapperException
javaObject
- java objectpretty
- indicating if the print should be made pretty (human
readers) or compact (transmission or storage).
com.sdicons.json.mapper.MapperException
- thrown when conversion fails
|
Log4j 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |