sighmon/mjml-rails

Support JSON MJML templates

Closed this issue · 1 comments

Context is shared with mjmlio/mjml#2343:

I'm working with Mailjet's templates API. Templates get returned from this in JSON format. If I can't get that converted back to standard MJML so that it's compatible with this library, it'd at least be good to be able to use it directly.

It's already compatible with the CLI, so I think the only gatekeeper here might be the validation that the file starts with an <mjml> tag.

You can use my Ruby snippet to convert the MJML from JSON back to XML.