** A JavaScript literal that is written out verbatim by 'JsonWriter'.** ** Use 'JsLiterals' to embed Javascript in your JSON objects. Note that the resultant string is no ** longer valid JSON, but can sometimes be a good *get out of jail* card.** ** pre>** syntax: fantom** jsonWriter.writeJson([** "func" : JsLiteral("function() { ... }")** ])** ** // --> { "func" : function() { ... } }** <pre** ** Your own classes may extend 'JsLiteral' and their 'toStr()' representation is output in the JSON.** ** Note that without 'JsLiteral', the function would be surrounded in quotes:** ** pre>** syntax: fantom** jsonWriter.writeJson([** "func" : "function() { ... }"** ])** ** // --> { "func" : "function() { ... }" }** <pre** @Js mixin JsLiteral {** Creates a 'JsonLiteral' instance.staticnew fromStr(Str val){ JsLiteralImpl(val)}}@Js @Serializable { simple = true}internalconstclass JsLiteralImpl : JsLiteral {const Str valnew make(Str val){this.val = val }override Str toStr(){ val }override Int hash(){ val.hash }override Bool equals(Obj? that){(that as JsLiteralImpl)?.val == val }}