FelixSchwarz / mjml-python

Python implementation for MJML - a framework that makes responsive-email easy
MIT License
76 stars 16 forks source link

Add json format support #12

Closed pcorpet closed 3 years ago

pcorpet commented 3 years ago

The javascript version of mjml handles json MJML both as input (if you give a dict to the mjml2html function) and as an output (in a json field).

Before sending you a PR:

FelixSchwarz commented 3 years ago

Thank you for sending the PR.

  • is it OK to add this feature?
  • for input, the API is not exactly the same as in js (python accepts a file descriptor, whereas js gets a string), is it OK to accept a dict for json-like format?

I was not aware of json MJML but if you need this we can add it of course.

Also I don't think we need bug-for-bug compatibility. The Python implementation should be reasonably similar but we can change the details to make the API easier to use in Python.

I'll look at your bug report later today - it's a very busy time here.

FelixSchwarz commented 3 years ago

closed by #13 (but I'd appreciate a response regarding hiding children)