can beautifulsoup process json? Not elegantly.
You *could* extract JSON strings from HTML with BS, then parse separately. But that’s like using a sledgehammer for a thumbtack.
For APIs, `requests` + `json` is the way. For files, `json.load()`.
If you’re feeling fancy, `pydantic` validates JSON data nicely.
You *could* extract JSON strings from HTML with BS, then parse separately. But that’s like using a sledgehammer for a thumbtack.
For APIs, `requests` + `json` is the way. For files, `json.load()`.
If you’re feeling fancy, `pydantic` validates JSON data nicely.
