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.
Serializes a message to JSON.
-
Method Summary
Modifier and TypeMethodDescriptionvoidwriteValue(Writer writer, io.cucumber.messages.types.Envelope value) Serialize a message to JSON and write it to the givenwriter.
-
Method Details
-
writeValue
Serialize a message to JSON and write it to the givenwriter.- Values must be included unless their value is
nullor 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
writerafter writing avalue.
- Parameters:
writer- to write tovalue- to serialize- Throws:
IOException- if anything goes wrong
- Values must be included unless their value is
-