ensure recursive toJSON-ing for arrays' contents