Escape \ in JS function call arguments
Add more ASSERTs to track correct JSON generation
Convert QVariantHash to QVariantMap for JSON generation