I have this:
Map<String, Object> social = new HashMap<String, Object>(); social.put("socialId", socialId);
and I'm trying to do this:
builder = Response.status(Response.Status.OK).entity(social);
Why am I receiving HTTP Status 500 - java.lang.ClassCastException: java.lang.Long cannot be cast to java.util.Collection, since Object should work with Long and general Object classes? Can't I send two different types of data, so data contains data.socialId (as a Long) and data.savedComment (as an object)?
*By the way, socialId is a Long object, and savedComment is a SocialComment object.