You can pass STRING to a JSONObject with leading spaces. Try to crop
JSONObject allCDs = new JSONObject(objectString.replace(/^\s+/,""));
EDIT: I thought it was javascript. Try trimming it with Java code instead
JSONObject allCDs = new JSONObject(objectString.trim());
If this still does not work, then show what the first character from the string is:
System.out.println((int)objectString.trim().charAt(0));
You should expect 123, braces. In fact, check all the content
System.out.println((int)objectString);
You can also try cutting off everything to {in the line
JSONObject allCDs = new JSONObject(objectString.substring(objectString.indexOf('{')));
RichardTheKiwi
source share