Examples of toJSONArray()


Examples of com.youtube.util.ToJSON.toJSONArray()

                      "where UPPER(PC_PARTS_MAKER) = ? ");
     
      query.setString(1, brand.toUpperCase()); //protect against sql injection
      ResultSet rs = query.executeQuery();
     
      json = converter.toJSONArray(rs);
      query.close(); //close connection
    }
    catch(SQLException sqlError) {
      sqlError.printStackTrace();
      return json;
View Full Code Here

Examples of com.youtube.util.ToJSON.toJSONArray()

       */
      query.setString(1, brand.toUpperCase()); //first ?
      query.setInt(2, item_number); //second ?
      ResultSet rs = query.executeQuery();
     
      json = converter.toJSONArray(rs);
      query.close(); //close connection
    }
    catch(SQLException sqlError) {
      sqlError.printStackTrace();
      return json;
View Full Code Here

Examples of com.youtube.util.ToJSON.toJSONArray()

      query = conn.prepareStatement("select PC_PARTS_PK, PC_PARTS_TITLE, PC_PARTS_CODE, PC_PARTS_MAKER, PC_PARTS_AVAIL, PC_PARTS_DESC " +
                      "from PC_PARTS");
     
      ResultSet rs = query.executeQuery();
     
      json = converter.toJSONArray(rs);
      query.close(); //close connection
    }
    catch(SQLException sqlError) {
      sqlError.printStackTrace();
      return json;
View Full Code Here

Examples of com.youtube.util.ToJSON.toJSONArray()

      query = conn.prepareStatement("select to_char(sysdate,'YYYY-MM-DD HH24:MI:SS') DATETIME " +
                      "from sys.dual");
     
      ResultSet rs = query.executeQuery();
     
      json = converter.toJSONArray(rs);
      query.close(); //close connection
    }
    catch(SQLException sqlError) {
      sqlError.printStackTrace();
      return json;
View Full Code Here

Examples of org.apache.sling.commons.json.JSONObject.toJSONArray()

        }
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < ja.length(); i += 1) {
            JSONObject jo = ja.optJSONObject(i);
            if (jo != null) {
                sb.append(rowToString(jo.toJSONArray(names)));
            }
        }
        return sb.toString();
    }
}
View Full Code Here

Examples of org.codehaus.jettison.json.JSONObject.toJSONArray()

    if (errorMessagesJsonArray != null) {
      errorMessages.addAll(JsonParseUtil.toStringCollection(errorMessagesJsonArray));
    }
    final JSONObject errorJsonObject = jsonObject.optJSONObject("errors");
    if (errorJsonObject != null) {
      final JSONArray valuesJsonArray = errorJsonObject.toJSONArray(errorJsonObject.names());
      if (valuesJsonArray != null) {
        errorMessages.addAll(JsonParseUtil.toStringCollection(valuesJsonArray));
      }
    }
    return errorMessages;
View Full Code Here

Examples of org.codehaus.jettison.json.JSONObject.toJSONArray()

    if (errorMessagesJsonArray != null) {
      errorMessages.addAll(JsonParseUtil.toStringCollection(errorMessagesJsonArray));
    }
    final JSONObject errorJsonObject = jsonObject.optJSONObject("errors");
    if (errorJsonObject != null) {
      final JSONArray valuesJsonArray = errorJsonObject.toJSONArray(errorJsonObject.names());
      if (valuesJsonArray != null) {
        errorMessages.addAll(JsonParseUtil.toStringCollection(valuesJsonArray));
      }
    }
    return errorMessages;
View Full Code Here

Examples of org.sf.bee.commons.remoting.jrpc.serializer.FixUp.toJSONArray()

                o.put("result", _result);
                if (_fixUps != null && _fixUps.size() > 0) {
                    JSONArray fixups = new JSONArray();
                    for (Iterator i = _fixUps.iterator(); i.hasNext();) {
                        FixUp fixup = (FixUp) i.next();
                        fixups.put(fixup.toJSONArray());
                    }
                    o.put("fixups", fixups);
                }
            } else if (_errorCode == CODE_REMOTE_EXCEPTION) {
                o.put("id", _id);
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.