Ich möchte ein JSON Objekt in Python Flask ausgeben.
if apikey not in allowed_api_keys:
tmp = "Kein API Key!"
_json = {"type":"answer","content":base64.b64encode(tmp.encode()).decode()}
return Response(_json, content_type="text/plain")
Aber in Javascript kommt in dieser Zeile
const jsonArray = chunk.match(/{[^}]+}/g).map(json => JSON.parse(json));
dieser Fehler
TypeError: Cannot read properties of null (reading 'map')
Was ist da falsch?