@ SuppressWarnings ( "unchecked" ) public JSONObject toJSONObject ( ) { final JSONObject activity = new JSONObject ( ) ; // parse time stamp activity . put ( "published" , dateFormatter . format ( new Date ( this . timestamp ) ) ) ; // TODO: check performance // parse user // final Map<String, Object> user = this.creator.toActorJSON(); // activity.put("actor", user); // parse verb:read activity . put ( "verb" , "read" ) ; // parse object final Map < String , Object > object = this . toObjectJSON ( ) ; activity . put ( "object" , object ) ; return activity ; }
parse the status update to an Activity JSON String