Package org.opensocial.data

Examples of org.opensocial.data.OpenSocialField.addValue()


      }

      if (isJsonObject(property)) {
        try {
          OpenSocialField field = new OpenSocialField(true);
          field.addValue(new OpenSocialObject(createObjectRepresentation(
              o.getJSONObject(key))));
          r.put(key, field);
          continue;
        } catch (JSONException e) {
          // If this isn't an object, try to parse it as something else
View Full Code Here


          JSONArray p = o.getJSONArray(key);
          Collection<Object> values = createArrayRepresentation(p);
          OpenSocialField field = new OpenSocialField(true);

          for (Object v : values) {
            field.addValue(v);
          }

          r.put(key, field);
          continue;
        } catch (JSONException e) {
View Full Code Here

        }
      }

      // As a last resort, add in the value as a string
      OpenSocialField field = new OpenSocialField(false);
      field.addValue(unescape(property));
      r.put(key, field);
    }

    return r;
  }
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.