Python Forum
request.get to read large response
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
request.get to read large response
#7
I try two method describe in that document but didn't work that is why ask. searching around didn't find any example either.

here is what I try

# Option 1: supply json_stream.encoding.default as the default argument
print(json.dumps(data, default=default))

# Option 2: supply json_stream.encoding.JSONStreamEncoder as the cls argument
# This allows you to created your own subclass to further customise encoding
print(json.dumps(data, cls=JSONStreamEncoder))

both prints empty dictionary.
Reply


Messages In This Thread
RE: request.get to read large response - by buran - Apr-05-2022, 02:24 PM
RE: request.get to read large response - by pythonlearner1 - Apr-05-2022, 06:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how can I correct the Bad Request error on my curl request tomtom 8 5,170 Oct-03-2021, 06:32 AM
Last Post: tomtom
  Unable to convert request response. johnboy1974 4 3,154 Apr-05-2021, 10:10 AM
Last Post: snippsat
  can't read QRcode in large file simoneek 0 1,534 Sep-16-2020, 08:52 AM
Last Post: simoneek
  Read/Sort Large text file avoiding line-by-line read using mmep or hdf5 Robotguy 0 2,090 Jul-22-2020, 08:11 PM
Last Post: Robotguy
  Empty response to request causing .json() to error t4keheart 1 10,204 Jun-26-2020, 08:35 PM
Last Post: bowlofred
  ImportError: cannot import name 'Request' from 'request' abhishek81py 1 3,985 Jun-18-2020, 08:07 AM
Last Post: buran
  Issues parsing the response from a request garnold 3 2,632 May-14-2019, 12:39 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020