Serialize an object into dictionary form.  Useful if you have to
        serialize an array of objects into JSON.  Otherwise, if you call the
        :meth:`to_json` method on each object in the list and then try to
        dump the array, you end up with an array with one string.

def to_dictionary(self):
        """Serialize an object into dictionary form.  Useful if you have to
        serialize an array of objects into JSON.  Otherwise, if you call the
        :meth:`to_json` method on each object in the list and then try to
        dump the array, you end up with an array with one string."""

        j = {}
        j['interval'] = {'start': self.start.isoformat(),
                         'end': self.end.isoformat()}
        j['found'] = {'v': self.v, 't': self.t.isoformat()}
        return j