add error message and auto root wrapper if json with a root