Role support

Since we're escaping the JSON here, we need to unescape it in the JS, which I don't see in this pull request.