continue;
}
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
}
}
if (isJsonArray(property)) {
try {
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) {
// If this isn't an array, try to parse it as something else
}
}
// 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;
}