org.usergrid.utils
Class JsonUtils

java.lang.Object
  extended by org.usergrid.utils.JsonUtils

public class JsonUtils
extends Object

Author:
edanuff

Constructor Summary
JsonUtils()
           
 
Method Summary
static Object fromByteBuffer(ByteBuffer byteBuffer)
           
static Object fromByteBuffer(ByteBuffer byteBuffer, Class<?> clazz)
           
static org.codehaus.jackson.schema.JsonSchema getJsonSchema(Class<?> cls)
           
static org.codehaus.jackson.JsonNode getJsonSchemaNode(Class<?> cls)
           
static boolean isSmile(ByteBuffer buffer)
           
static Object loadFromFilesystem(String filename)
           
static Object loadFromResourceFile(String file)
           
static Object loadFromUrl(String urlStr)
           
static Object loadFromUrl(URL url)
           
static String mapToFormattedJsonString(Object obj)
           
static String mapToJsonString(Object obj)
           
static org.codehaus.jackson.JsonNode nodeFromByteBuffer(ByteBuffer byteBuffer)
           
static Object normalizeJsonTree(Object obj)
           
static Object parse(String json)
           
static String quoteString(String s)
           
static String schemaToFormattedJsonString(org.codehaus.jackson.schema.JsonSchema schema)
           
static Object select(Object obj, String path)
           
static Object select(Object obj, String path, boolean buildResultTree)
           
static ByteBuffer toByteBuffer(Object obj)
           
static Map<String,Object> toJsonMap(Object obj)
           
static org.codehaus.jackson.JsonNode toJsonNode(Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonUtils

public JsonUtils()
Method Detail

mapToJsonString

public static String mapToJsonString(Object obj)
Parameters:
obj -
Returns:

mapToFormattedJsonString

public static String mapToFormattedJsonString(Object obj)

schemaToFormattedJsonString

public static String schemaToFormattedJsonString(org.codehaus.jackson.schema.JsonSchema schema)

getJsonSchema

public static org.codehaus.jackson.schema.JsonSchema getJsonSchema(Class<?> cls)

parse

public static Object parse(String json)

getJsonSchemaNode

public static org.codehaus.jackson.JsonNode getJsonSchemaNode(Class<?> cls)

quoteString

public static String quoteString(String s)

toByteBuffer

public static ByteBuffer toByteBuffer(Object obj)

fromByteBuffer

public static Object fromByteBuffer(ByteBuffer byteBuffer)

fromByteBuffer

public static Object fromByteBuffer(ByteBuffer byteBuffer,
                                    Class<?> clazz)

nodeFromByteBuffer

public static org.codehaus.jackson.JsonNode nodeFromByteBuffer(ByteBuffer byteBuffer)

toJsonNode

public static org.codehaus.jackson.JsonNode toJsonNode(Object obj)

toJsonMap

public static Map<String,Object> toJsonMap(Object obj)

normalizeJsonTree

public static Object normalizeJsonTree(Object obj)

select

public static Object select(Object obj,
                            String path)

select

public static Object select(Object obj,
                            String path,
                            boolean buildResultTree)

loadFromResourceFile

public static Object loadFromResourceFile(String file)

loadFromFilesystem

public static Object loadFromFilesystem(String filename)

loadFromUrl

public static Object loadFromUrl(String urlStr)

loadFromUrl

public static Object loadFromUrl(URL url)

isSmile

public static boolean isSmile(ByteBuffer buffer)


Copyright © 2013. All Rights Reserved.