Show full detail error message on the console
What you see is just the part of the line where PostgreSQL sees a problem, you cannot bet more.

But since you know that the problem is in line 1, you should be able to

SELECT json
FROM event_json
WHERE json::JSONB-&gt;&gt;'room_id' LIKE '%matrix.org%'
LIMIT 1;


and search for the offending \u0000.