clojure/data.json — pull request #2 by scramjet (2011-12-15 05:00:37+00:00)
Title: Fix for error writing strings with characters outside the BMP

Hello,

one of my users decided to start sending Emoji happy faces over a network protocol encoded using data.json, which caused it to promptly roll over and die. It turned out that write-json-string, while aware of the code point vs. character issue, was still iterating over a character count not a code point count.

This change fixes this. I've copied the "codepoints" fn from contrib.string since I couldn't find it anywhere in the 1.3 universe.