private static Optional<String> toString(RestApi.RequestContext context) {
        try {
            return toByteArray(context).map(bytes -> new String(bytes, UTF_8));
        } catch (RuntimeException e) {
            throw new RestApiException.BadRequest("Failed parse request content as UTF-8: " + Exceptions.toMessageString(e), e);
        }
    }
Implementations of {@link ExceptionMapper}, {@link RequestMapper} and {@link ResponseMapper}.

@author bjorncs
container-core/src/main/java/com/yahoo/restapi/RestApiMappers.java