cucumber/gherkin — pull request #269 by brasmusson (2013-07-31 20:40:51+00:00)
Title: Change the java JSONFormatter to handle embedding text in the report correctly

The java JSONFormatter does not handle calls to write() correctly. The formatter expects them after the result() call, but if a step definition uses write() calls to embed text in the report, they will occur after the match() call but before the result() call.
This is the root cause of the following issue in Cucumber-JVM: https://github.com/cucumber/cucumber-jvm/issues/565
Change the java JSONFormatter so that it can handle calls to write() after the call to match() but before the call to result().