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

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


      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

            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)));
      }
      else if (t == Types.ARRAY_DOUBLE)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new DoubleValue(Array.getDouble(array, i)));
View Full Code Here

            jsonArray.addElement(new DoubleValue(Array.getFloat(array, i)));
      }
      else if (t == Types.ARRAY_DOUBLE)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new DoubleValue(Array.getDouble(array, i)));
      }
      else if (t == Types.ARRAY_CHAR)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new StringValue(Character.toString(Array.getChar(array, i))));
View Full Code Here

            jsonArray.addElement(new DoubleValue(Array.getDouble(array, i)));
      }
      else if (t == Types.ARRAY_CHAR)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new StringValue(Character.toString(Array.getChar(array, i))));
      }
      else if (t == Types.ARRAY_STRING)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new StringValue((String)Array.get(array, i)));
View Full Code Here

            jsonArray.addElement(new StringValue(Character.toString(Array.getChar(array, i))));
      }
      else if (t == Types.ARRAY_STRING)
      {
         for (int i = 0; i < length; i++)
            jsonArray.addElement(new StringValue((String)Array.get(array, i)));
      }
      else if (t == Types.ARRAY_OBJECT)
      {
         for (int i = 0; i < length; i++)
         {
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(el) != null)
               jsonArray.addElement(createJsonValue(el));
            else
               jsonArray.addElement(createJsonObject(el));
         }
      }
      else
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.