About 50 results
Open links in new tab
  1. 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...

  2. 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 heavily …

  3. python - Selecting fields from JSON output - Stack Overflow

    Oct 17, 2012 · 15 Assuming you are dealing with a JSON-string in the input, you can parse it using the json package, see the documentation. In the specific example you posted you would need

  4. python - Accessing JSON elements - Stack Overflow

    What you get from the url is a json string. And your can't parse it with index directly. You should convert it to a dict by json.loads and then you can parse it with index. Instead of using .read() to …

  5. 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 urllib.urlopen (url).read () …

  6. python - Loading and parsing a JSON file with multiple JSON objects ...

    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, use How do I …

  7. python - What's the best way to parse a JSON response from the …

    Mar 24, 2020 · 430 I'm using the python requests module to send a RESTful GET to a server, for which I get a response in JSON. The JSON response is basically just a list of lists. What's the best way to …

  8. python - Loading JSONL file as JSON objects - Stack Overflow

    Feb 17, 2019 · I want to load a JSONL file as JSON objects in python. Is there an easy way to do so?

  9. How I can I lazily read multiple JSON values from a file/stream in Python?

    Jul 31, 2011 · 119 I'd like to read multiple JSON objects from a file/stream in Python, one at a time. Unfortunately json.load() just .read() s until end-of-file; there doesn't seem to be any way to use it to …

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

    Adding another solution (Python 3) - Iterating over json files in a directory and on each file iterating over all objects and printing relevant fields. See comments in the code.