Does anyone know whether there is any difference in the functionality of the stringify and jsonstringify filter operators?
I’ve been working the docs for these filters in this draft PR: Improve jsonstringify and stringify operators docs by mateuszwilczek · Pull Request #7650 · Jermolene/TiddlyWiki5 (github.com).
Currently these operators have identical documentation and examples (permalink). The only difference is in the table with filter operators: stringify applies JS formatting, jsonstringify applies JSON formatting (but isn’t that the same thing?). Please mind the typos in the docs: there are redundant backslashes \ before some escaped characters, already taken care of in my PR.
I don’t have much understanding of TW’s JS internals, but from what I have explored, both operators, or associated JS functions, seem to be defined identically. stringify was introduced in v5.1.14, jsonstringify in v5.1.15, the rawunicode suffix was added to both of them in v5.1.23. Also, jsonstringify function seems to be defined only to be used through the filter operator, whereas the older stringify function is used internally in a couple of places in the core. It seems to me that jsonstringify is just an unnecessary duplication of stringify.
Does anyone know if there is any difference between these operators? Or can anyone confirm, that this is in fact an overlook, and jsonstringify is unnecessary?
Edit: typos, added links do docs.