Convert request / tough-cookie jars to and from JSON