JSON escaping bug fixed. First test added.