About 156,000 results
Open links in new tab
  1. python - Reading JSON from a file - Stack Overflow

    If you are reading the data from the Internet instead, the same techniques can generally be used with the response you get from your HTTP API (it will be a file-like object); however, it is …

  2. How can I parse (read) and use JSON in Python? - Stack Overflow

    My Python program receives JSON data, and I need to get bits of information out of it. How can I parse the data and use the result? I think I need to use json.loads for this task, but I can't under...

  3. python - What is the difference between json.load () and …

    Sep 27, 2016 · In Python, what is the difference between json.load() and json.loads()? I guess that the load () function must be used with a file object (I need thus to use a context manager) …

  4. python - Loading and parsing a JSON file with multiple JSON …

    You probably don't want to append each result to one list and then process everything if your file is really big. If you have a file containing individual JSON objects with delimiters in-between, …

  5. JSONDecodeError: Expecting value: line 1 column 1 (char 0)

    In my case it occured because i read the data of the file using file.read() and then tried to parse it using json.load(file).I fixed the problem by replacing json.load(file) with json.loads(data)

  6. How can I handle reading a .json file in it that has comments with ...

    Sep 20, 2017 · But this crashes at the json.load (f) command because the file f has comments in it. I thought this would be a common problem but I can't find much online RE how to handle it …

  7. How to get JSON from webpage into Python script

    Unfortunately, that doesn't work in Python 3. json.load is just a wrapper around json.loads that calls read () for a file-like object. json.loads requires a string object and the output of …

  8. python - Iterating through a JSON object - Stack Overflow

    json_object = json.load(raw) You shouldn't think of what you get as a "JSON object". What you have is a list. The list contains two dicts. The dicts contain various key/value pairs, all strings. …

  9. python - What is the difference between json.dumps and json.load ...

    Oct 2, 2015 · What is the difference between json.dumps and json.load? From my understanding, one loads JSON into a dictionary and another loads into objects.

  10. python - Why do I get "'str' object has no attribute 'read'" when ...

    Official documentation json.load - Deserialize fp (a .read ()-supporting text file or binary file containing a JSON document) to a Python object using this conversion table. json.loads - …