Convenience method allowing easy dumping to and loading from json.

def json(self, json_string=None):
        """
            Convenience method allowing easy dumping to and loading from json.
        """
        if json_string is not None:
            return self.__init__(loads(json_string))
        dump = self
        if isinstance(self, HAR.log):
            dump = {"log": dump}
        return dumps(dump, default=lambda x: dict(x))