Package io.cucumber.htmlformatter
Interface MessagesToHtmlWriter.Serializer
-
- Enclosing class:
- MessagesToHtmlWriter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface MessagesToHtmlWriter.Serializer
Serializes a message to JSON.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
writeValue(Writer writer, io.cucumber.messages.types.Envelope value)
Serialize a message to JSON and write it to the givenwriter
.
-
-
-
Method Detail
-
writeValue
void writeValue(Writer writer, io.cucumber.messages.types.Envelope value) throws IOException
Serialize a message to JSON and write it to the givenwriter
.- Values must be included unless their value is
null
or an "absent" reference values such as empty optionals. - Enums must be written as strings.
- The solidus
/
may not be escaped. Writing json into the html context is handled in this implementation. - Implementations may not close the
writer
after writing avalue
.
- Parameters:
writer
- to write tovalue
- to serialize- Throws:
IOException
- if anything goes wrong
- Values must be included unless their value is
-
-