org.exoplatform.ws.frameworks.json.impl
Class JsonUtils

java.lang.Object
  extended by org.exoplatform.ws.frameworks.json.impl.JsonUtils

public final class JsonUtils
extends java.lang.Object

Version:
$Id: $
Author:
Andrey Parfonov

Nested Class Summary
static class JsonUtils.JsonToken
          Types of Json tokens.
static class JsonUtils.Types
          Known types.
 
Method Summary
static java.lang.String getJsonString(java.lang.String string)
          Transform Java String to JSON string.
static JsonUtils.Types getType(java.lang.Class<?> clazz)
          Get 'type' of Class.
static JsonUtils.Types getType(java.lang.Object o)
          Get 'type' of Object.
static boolean isKnownType(java.lang.Class<?> clazz)
          Check is given Class is known.
static boolean isKnownType(java.lang.Object o)
          Check is given Object is known.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getJsonString

public static java.lang.String getJsonString(java.lang.String string)
Transform Java String to JSON string.

Parameters:
string - source String.
Returns:
result.

isKnownType

public static boolean isKnownType(java.lang.Object o)
Check is given Object is known.

Parameters:
o - Object.
Returns:
true if Object is known, false otherwise.

isKnownType

public static boolean isKnownType(java.lang.Class<?> clazz)
Check is given Class is known.

Parameters:
clazz - Class.
Returns:
true if Class is known, false otherwise.

getType

public static JsonUtils.Types getType(java.lang.Object o)
Get 'type' of Object. @see KNOWN_TYPES .

Parameters:
o - Object.
Returns:
'type'.

getType

public static JsonUtils.Types getType(java.lang.Class<?> clazz)
Get 'type' of Class. @see KNOWN_TYPES .

Parameters:
clazz - Class.
Returns:
'type'.


Copyright © 2010 eXo Platform SAS. All Rights Reserved.