feat: unserialize strings or objects

This change makes it so the unserializing function is always the same
and supports objects or JSON encoded strings. Possibly breaking, if your
code stores JSON in a string and expects it to come back as a
JSON-encoded string.