internet data handling and encoding raw_decode(sreturns tuple (pyobjindexwhere pyobj is the python representation of json object in and index is the position in where the json object ended this can be used if you are trying to parse an object out of an input stream where there is extra data at the end jsonencoder(**optsa class that encodes python object into json opts represents set of keyword arguments that are identical to those used by the dump(function an instance of jsonencoder has the following methodse default(objmethod called when python object obj can' be encoded according to any of the normal encoding rules the method should return result which is one of the types that can be encoded (for examplea stringlistor dictionarye encode(objmethod that' called to create json representation of python object obj iterencode(objcreates an iterator that produces the strings making up the json representation of python object obj as they are computed the process of creating json string is highly recursive in nature for instanceit involves iterating over the keys of dictionary and traversing down into other dictionaries and lists found along the way if you use this methodyou can process the output in piecemeal manner as opposed to having everything collected into huge in-memory string if you define subclasses that inherit from jsondecoder or jsonencoderyou need to exercise caution if your class also defines _init_ (to deal with all of the keyword argumentshere is how you should define itclass myjsondecoder(jsondecoder)def _init_ (self**kwargs)get my own arguments foo kwargs pop('foo',nonebar kwargs pop('bar',noneinitialize the parent with everything left over jsondecoder _init_ (self,**kwargsmimetypes the mimetypes module is used to guess the mime type associated with filebased on its filename extension it also converts mime types to their standard filename extensions mime types consist of type/subtype pair--for example 'text/html''image/png'or 'audio/mpegguess_type(filename [strict]guesses the mime type of file based on its filename or url returns tuple (typeencodingin which type is string of the form "type/subtypeand encoding is the program used to encode the data for transfer (for examplecompress or gzipreturns (nonenoneif the type cannot be guessed if strict is true (the lib fl ff