Now, I'm very aware this is not a Rails gem; but what you've called the html_safe flag, even though your usage is much more accurate to the name of the flag (and while I also hate the way the rails guys named that one in particular), I think you could take a page from the rails book there. The rails convention is everything not flagged should be escaped, and adding html_safe means you've already escaped and cleared it.
The same concepts maybe don't apply here because it's a JSON library; but just food for thought
Now, I'm very aware this is not a Rails gem; but what you've called the
html_safe
flag, even though your usage is much more accurate to the name of the flag (and while I also hate the way the rails guys named that one in particular), I think you could take a page from the rails book there. The rails convention is everything not flagged should be escaped, and addinghtml_safe
means you've already escaped and cleared it.The same concepts maybe don't apply here because it's a JSON library; but just food for thought