How can I serialize a filter variable to a string in Workshop?

I want to serialize and unserialize a string to a filter variable in Workshop, for instance to pass it to a function, an action or to store it/retrieve it later.

How can I cast a filter variable to a string to do the above ?

This isn’t currently supported

You may be able to set up an object set filter variable in a way where it references strings, instead of serializing/deserializing the object set filter itself. This is hinted at in the Workshop routing docs where storing an object set filter variable in the URL is similarly not supported.

Hi, I believe this does not solve the need (certainly does not mine).
It enables you to set the filter from string (one per property with one string), but not use/get the current value of the filter. Which really looks like plain json string.