title: Why doesn't the JSON-Simple parser expect a colon, in Java?
body: <p>I'm parsing a JSON block from twitter using JSON-Simple. I've run into an excepton:</p>
  
  <p><code>Exception in thread "main" Unexpected token COLON(:) at position 27</code><br/><code>...stack 
  trace...</code></p>
  
  <p>I've seen something similar on SO due to some specialness in the way JavaScript parses JSON (I think that JSONJ-P needs to recieve it padded) but this isn't the case here as I'm not in JS!</p>
  
  <p>Here is my JSON (sanitized):</p>
  
  <p><code>{"in_reply_to_status_id_str":null,"id_str":"23475129874512857","text":"RT @SanitizedPersonName: SomeTextIveSanitized @SanatizedTwitterHandle SomeMoreText http:\/\/t.co\/sanitized SomeText (MoreText) \/ Text", "restOfTheJson":"Is not Special"}</code></p>
  
  <p>Two things strike me. </p>
  
  <ol>
  <li>It prints out the line that it just read with buffered reader, and that doesn't have a <code>{</code> at the start of the block it does at the end. This seems like a serious issue.</li>
  <li>The character I read at position 27 is not a colon but <code>r</code></li>
  </ol>
  
  <p>So either buffered reader is eating my <code>{</code> or the parser is not parsing correctly. How do I tell which is it and fix the issue?</p>
  
  <p>n.b. I do have my print and parse line inside a <code>while(buff.read()!=-1)</code> (to check for line end) and an if statement that checks for a 'regex' <code>(if(!line.contains(DELETE_REGEX))</code> (to check for invalid jsons) could this be the cause? Here is the code:</p>
  
  <pre><code>buff = new BufferedReader(new FileReader(JSON_FILE_NAME+".json"));
  while(buff.read() != -1){
      line = buff.readLine();
      if(!line.contains(DELETE_REGEX)){
          System.out.println(line);
          myJSON=(JSONObject) parser.parse(line);
          myJSONSample.add(myJSON);
      }
  }
  return myJSONSample;
  </code></pre>
  
  <p>I've missed out some inconsequential stuff.</p>