But if you want hierarchy (in Postgres), to_jsonb(…) is your friend.
Why TF would I use json? There's a reason I picked a relational database. Nonsense.
And also such a performance trap.