MCPcopy
hub / github.com/google/gson / setHtmlSafe

Method setHtmlSafe

src/main/java/com/google/gson/stream/JsonWriter.java:208–210  ·  view source on GitHub ↗

Configure this writer to emit JSON that's safe for direct inclusion in HTML and XML documents. This escapes the HTML characters <, >, & and = before writing them to the stream. Without this setting, your XML/HTML encoder should replace these characters with the corres

(boolean htmlSafe)

Source from the content-addressed store, hash-verified

206 * corresponding escape sequences.
207 */
208 public void setHtmlSafe(boolean htmlSafe) {
209 this.htmlSafe = htmlSafe;
210 }
211
212 /**
213 * Returns true if this writer writes JSON that's safe for inclusion in HTML

Callers 2

toJsonMethod · 0.80

Calls

no outgoing calls

Tested by 1