In custom assertion it is possible to have access to context variables. In the case of String, it is straight forward.
In the case of an actual Message (instance of com.l7tech.message.Message), for example the request, is it allowed to pass a Message as input to a Custom Assertion? If so, it probably means we shall be able to call methods such as isXml(), isJson(), and access message content via methods such as getXmlKnob() or getJsonKnob().
I can see a big performance benefit by not having to convert a message to a string, then pass the string to the custom assertion and then parse it (SAX, DOM, etc or similar in the JSON world) before the assertion can do its job.