I'm a bit worried about removing these encode calls.  It seems like they're useless since we just stringify again anyway...