cucumber-attic / gherkin2

A fast Gherkin parser in Ragel (The parser behind Cucumber)
MIT License
381 stars 220 forks source link

Let the Java JSON Formatter handle output and embeddings in hooks #289

Open brasmusson opened 10 years ago

brasmusson commented 10 years ago

https://github.com/cucumber/cucumber-jvm/issues/638 showed that the Java JSON Formatter does not handle output and embeddings in hooks properly (that is calls to cucumber.api.scenario.write() and cucumber.api.scenario.embed() in hooks). This PR should fix this.

dclancey commented 10 years ago

I have run into issues with Java JSON Formatter using the write(String) and embedding(String, byte[]) methods. In particular List is output as a Java OID, not as a JSON array.

I would be desirable to use the existing JSON Formatter to add some custom output than re-implement a Formatter and Reporter just to capture that additional data.