import { htmlSafe } from "@ember/template"; import { escapeExpression } from "discourse/lib/utilities"; export function jsonToHtml(json) { if (json === null) { return "null"; } if (typeof json !== "object") { return escapeExpression(json); } let html = ""; return htmlSafe(html); }