if (params == null) throw new CommandParsingException(command,"missing required parameters");
JsonNode user = params.path("user");
JsonNode query = params.get("query");
if (!user.isTextual()) throw new CommandParsingException(command,"missing required paramter user as string");
if (query!=null && !query.isObject()) throw new CommandParsingException(command,"query must be a json object");
QueryParams qparams = QueryParams.getParamsFromJson(query);
try {
List<ODocument> res = following ?
FriendShipService.getFollowing(user.asText(), qparams) :
FriendShipService.getFriendsOf(user.asText(), qparams);