Class JsonStringContent
java.lang.Object
org.ek9lang.core.JsonStringContent
- All Implemented Interfaces:
Function<String,String>, UnaryOperator<String>
THE content of a JSON string for hand-built JSON text: the characters to put between the quotes, escaped as
RFC 8259 requires -
" and \, and EVERY control character below U+0020 (\b \f \n \r \t by
name, the rest as \u00XX). Everything else is kept as it is, so text without control characters
comes out exactly as the hand-written escapers wrote it. Use this rather than a private escapeJson: those
escaped only \n \r \t (two not even those), so a message holding any other control character - an ANSI
colour code's ESC, a form feed in a source - made the whole document unreadable (defect 7 of the services
no-statics assessment, 2026-11-04). Where a value is serialised whole, prefer an ObjectMapper.
Stateless: hold one. The value must not be null - each caller says what an absent value is.
-
Constructor Details
-
JsonStringContent
public JsonStringContent()
-
-
Method Details
-
apply
-