public class JSONUtil extends Object
Constructor and Description |
---|
JSONUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
generatePrettyJson(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter jsonConverter,
Object aObject,
File aFile)
Convert Java objects into JSON format and write it to a file
|
static void |
generatePrettyJson(Object aObject,
File aFile) |
static org.springframework.http.converter.json.MappingJackson2HttpMessageConverter |
getJsonConverter() |
static String |
toInterpretableJsonString(Object aObject) |
static String |
toJsonString(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter jsonConverter,
boolean aPretty,
Object aObject) |
static String |
toJsonString(Object aObject) |
static String |
toPrettyJsonString(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter jsonConverter,
Object aObject) |
static String |
toPrettyJsonString(Object aObject) |
public static void generatePrettyJson(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter jsonConverter, Object aObject, File aFile) throws IOException
aObject
- the object.aFile
- the fileIOException
- if an I/O error occurs.public static void generatePrettyJson(Object aObject, File aFile) throws IOException
IOException
public static String toPrettyJsonString(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter jsonConverter, Object aObject) throws IOException
IOException
public static String toJsonString(Object aObject) throws IOException
IOException
public static String toJsonString(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter jsonConverter, boolean aPretty, Object aObject) throws IOException
IOException
public static String toPrettyJsonString(Object aObject) throws IOException
IOException
public static org.springframework.http.converter.json.MappingJackson2HttpMessageConverter getJsonConverter()
public static String toInterpretableJsonString(Object aObject) throws IOException
IOException
Copyright © 2012–2017. All rights reserved.