public class JsonUtils extends Object
| Constructor and Description |
|---|
JsonUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.codehaus.jackson.JsonNode |
convertToJson(Object source,
String label)
Converts object to JSON.
|
static org.codehaus.jackson.JsonNode |
convertToJsonQuoteIfNeeded(Object source,
String label)
Converts object to JSON, quotes the String value if it is needed (not a valid JSON object)
|
static Object |
quoteIfNeeded(Object source)
Add quotes around the object iff it's not a JSON object.
|
static org.codehaus.jackson.JsonNode |
readValue(Reader value,
String label)
Parses value from Reader.
|
static org.codehaus.jackson.JsonNode |
readValue(String value,
String label)
Parses value from String.
|
public static org.codehaus.jackson.JsonNode readValue(String value, String label)
value - label - label to be logged in case of error.public static org.codehaus.jackson.JsonNode readValue(Reader value, String label)
value - label - label to be logged in case of error.public static org.codehaus.jackson.JsonNode convertToJson(Object source, String label)
source - label - label to be logged in case of error.public static org.codehaus.jackson.JsonNode convertToJsonQuoteIfNeeded(Object source, String label)
source - label - label to be logged in case of error.Copyright © 2014. All Rights Reserved.