'Returns the data parsed from the given JSON string.
The data can be a nested structure of dict, list, str, unicode, bool, int, float and None.'

def loads(self, string, *args, **kwargs):

    s = string.strip()
    if s.startswith('"'):
        return self.decode(s)
    if s.isdigit():
        return int(s)
    if s.replace('.', '', 1).isdigit():
        return float(s)
    if (s in ('true', 'false')):
        return bool((s == 'true'))
    if (s == 'null'):
        return None
    if s.startswith('{'):
        return dict((map(self.loads, self._split(kv, ':')) for kv in self._split(s.strip('{}'))))
    if s.startswith('['):
        return list((self.loads(v) for v in self._split(s.strip('[]'))))
    raise TypeError(("can't    process    %s." % repr(string)))
