Package org.exoplatform.ws.frameworks.json.value.impl

Examples of org.exoplatform.ws.frameworks.json.value.impl.NullValue


   {
      Types t = JsonUtils.getType(object);
      switch (t)
      {
         case NULL :
            return new NullValue();
         case BOOLEAN :
            return new BooleanValue((Boolean)object);
         case BYTE :
            return new LongValue((Byte)object);
         case SHORT :
View Full Code Here


      {
         return new BooleanValue(Boolean.parseBoolean(new String(characters)));
      }
      else if ("null".equalsIgnoreCase(new String(characters)))
      {
         return new NullValue();
      }
      else
      {
         char c = characters[0];
         if ((c >= '0' && c <= '9') || c == '.' || c == '-' || c == '+')
View Full Code Here

    * {@inheritDoc}
    */
   public JsonValue createJsonArray(Collection<?> collection) throws JsonException
   {
      if (collection == null)
         return new NullValue();

      JsonValue jsonArray = new ArrayValue();
      for (Object o : collection)
      {
         // If :
View Full Code Here

    * {@inheritDoc}
    */
   public JsonValue createJsonArray(Object array) throws JsonException
   {
      if (array == null)
         return new NullValue();

      Types t = JsonUtils.getType(array);
      JsonValue jsonArray = new ArrayValue();
      int length = Array.getLength(array);
      if (t == Types.ARRAY_BOOLEAN)
View Full Code Here

   }

   public JsonValue createJsonObject(Map<String, Object> map) throws JsonException
   {
      if (map == null)
         return new NullValue();

      JsonValue jsonObject = new ObjectValue();
      Set<String> keys = map.keySet();
      for (String k : keys)
      {
View Full Code Here

   {
      Types t = JsonUtils.getType(object);
      switch (t)
      {
         case NULL :
            return new NullValue();
         case BOOLEAN :
            return new BooleanValue((Boolean)object);
         case BYTE :
            return new LongValue((Byte)object);
         case SHORT :
View Full Code Here

   {
      Types t = JsonUtils.getType(object);
      switch (t)
      {
         case NULL :
            return new NullValue();
         case BOOLEAN :
            return new BooleanValue((Boolean)object);
         case BYTE :
            return new LongValue((Byte)object);
         case SHORT :
View Full Code Here

    */
   public JsonValue createJsonArray(Object array) throws JsonException
   {
      if (array == null)
      {
         return new NullValue();
      }
      Types t = JsonUtils.getType(array);
      if (t == Types.ARRAY_BOOLEAN || t == Types.ARRAY_BYTE || t == Types.ARRAY_SHORT || t == Types.ARRAY_INT
         || t == Types.ARRAY_LONG || t == Types.ARRAY_FLOAT || t == Types.ARRAY_DOUBLE || t == Types.ARRAY_CHAR
         || t == Types.ARRAY_STRING || t == Types.ARRAY_OBJECT)
View Full Code Here

   {
      Types type = JsonUtils.getType(object);
      switch (type)
      {
         case NULL :
            return new NullValue();
         case BOOLEAN :
            return new BooleanValue((Boolean)object);
         case BYTE :
            return new LongValue((Byte)object);
         case SHORT :
View Full Code Here

    */
   public JsonValue createJsonArray(Object array) throws JsonException
   {
      if (array == null)
      {
         return new NullValue();
      }
      Types t = JsonUtils.getType(array);
      if (t == Types.ARRAY_BOOLEAN || t == Types.ARRAY_BYTE || t == Types.ARRAY_SHORT || t == Types.ARRAY_INT
         || t == Types.ARRAY_LONG || t == Types.ARRAY_FLOAT || t == Types.ARRAY_DOUBLE || t == Types.ARRAY_CHAR
         || t == Types.ARRAY_STRING || t == Types.ARRAY_OBJECT)
View Full Code Here

TOP

Related Classes of org.exoplatform.ws.frameworks.json.value.impl.NullValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.