The inverse of `ImportString`: serialises an expression in a given format
ExportString[expr, "format"]
ExportString[rules, {"format", "Rules"}]
ExportString[exprs, elems]
StringTrim[ExportString[{{a, 1, True, x + y}}, "CSV"]]
→ "a",1,true,"-Plus-"ExportString[{{1, 2}}, "String"]
→ {{1, 2}}ExportString[<|"a" -> Pi|>, "JSON"]
→
Export::jsonstrictencoding: Expression Pi cannot be exported as JSON.
$FailedExportString[XMLElement["a", {"x" -> "1"}, {"t"}], "XML"]
→ <a x='1'>t</a>ExportString[XMLElement["a", {}, {XMLElement["b", {}, {}]}], "XML"]
→ <a>
<b />
</a>