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

Examples of org.exoplatform.ws.frameworks.json.value.impl.ArrayValue.addElement()


               {
                  jsonArray.addElement(createJsonValue(el));
               }
               else
               {
                  jsonArray.addElement(createJsonObject(el));
               }
            }

            return jsonArray;
         }
View Full Code Here


            List<Object> list = new ArrayList<Object>((Collection<?>)object);
            for (Object o : list)
            {
               if (JsonUtils.getType(o) != null)
               {
                  jsonArray.addElement(createJsonValue(o));
               }
               else
               {
                  jsonArray.addElement(createJsonObject(o));
               }
View Full Code Here

               {
                  jsonArray.addElement(createJsonValue(o));
               }
               else
               {
                  jsonArray.addElement(createJsonObject(o));
               }
            }

            return jsonArray;
         }
View Full Code Here

         // 1. Known types (primitive, String, array of primitive or String)
         // 2. Array of any object (expect for Java Bean)
         // 3. Collection<?>
         // 4. Map<String, ?>
         if (JsonUtils.getType(o) != null)
            jsonArray.addElement(createJsonValue(o));
         else
            jsonArray.addElement(createJsonObject(o));
      }
      return jsonArray;
   }
View Full Code Here

         // 3. Collection<?>
         // 4. Map<String, ?>
         if (JsonUtils.getType(o) != null)
            jsonArray.addElement(createJsonValue(o));
         else
            jsonArray.addElement(createJsonObject(o));
      }
      return jsonArray;
   }

   /**
 
View Full Code Here

      JsonValue jsonArray = new ArrayValue();
      int length = Array.getLength(array);
      if (t == Types.ARRAY_BOOLEAN)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new BooleanValue(Array.getBoolean(array, i)));
      }
      else if (t == Types.ARRAY_BYTE)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new LongValue(Array.getByte(array, i)));
View Full Code Here

            jsonArray.addElement(new BooleanValue(Array.getBoolean(array, i)));
      }
      else if (t == Types.ARRAY_BYTE)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new LongValue(Array.getByte(array, i)));
      }
      else if (t == Types.ARRAY_SHORT)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new LongValue(Array.getShort(array, i)));
View Full Code Here

            jsonArray.addElement(new LongValue(Array.getByte(array, i)));
      }
      else if (t == Types.ARRAY_SHORT)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new LongValue(Array.getShort(array, i)));
      }
      else if (t == Types.ARRAY_INT)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new LongValue(Array.getInt(array, i)));
View Full Code Here

            jsonArray.addElement(new LongValue(Array.getShort(array, i)));
      }
      else if (t == Types.ARRAY_INT)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new LongValue(Array.getInt(array, i)));
      }
      else if (t == Types.ARRAY_LONG)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new LongValue(Array.getLong(array, i)));
View Full Code Here

            jsonArray.addElement(new LongValue(Array.getInt(array, i)));
      }
      else if (t == Types.ARRAY_LONG)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new LongValue(Array.getLong(array, i)));
      }
      else if (t == Types.ARRAY_FLOAT)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new DoubleValue(Array.getFloat(array, i)));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.