I want to have a CHECK constraint on a JSONB column that only permits non-empty JSON objects (only {} with attributes, no other values like [] or JSON primitives).
I only want to check the "root" value, it doesn't matter what is stored in these objects.
How can I do that?