Skip to content

Rule.io SDK


Rule.io SDK / rcml/src / jsonToEmailInlineRfm

Function: jsonToEmailInlineRfm()

jsonToEmailInlineRfm(json): string

Defined in: rcml/src/email/json-to-email-rfm.ts:57

Convert an RCML content JSON document back to an Email Inline RFM markdown string.

Reverse of emailInlineRfmToJson. Semantically equivalent to jsonToEmailRfm — use this name when the JSON was produced by emailInlineRfmToJson to keep the intent clear at call sites.

Parameters

json

Json

Typed RCML document JSON ({ type: 'doc', content: [...] }).

Returns

string

Email Inline RFM markdown string.

Example

ts
const json = emailInlineRfmToJson(':font[Click here]{font-weight="bold"}')
const md = jsonToEmailInlineRfm(json)
// md === ':font[Click here]{font-weight="bold"}'