making jsonlib stuff work - have to fetch out the document root