dictify is a simple method that accepts any python object or iterable and makes it JSON convertable avoiding the serialization error.