Refactor Java JSON parsing into JSONTokeniser