use r.json in document tests too