tests,json: Fix and improve t-json