This has a very limited use case, but I needed it for ClientSideValidations. It took a while to track down some of the possible conversion issues, I figure someone else might find this useful.
When you render it to the client simply instantiate a new
object with the resulting string:
If there are any edge-cases that won’t convert cleanly please report them in the comments.