for (Iterator<?> it = value.keySet().iterator(); it.hasNext();) {
Object key = it.next();
Object mapValue = value.get(key);
sb.append("\"");
if (key instanceof Paintable) {
Paintable paintable = (Paintable) key;
sb.append(getPaintIdentifier(paintable));
} else {
sb.append(escapeJSON(key.toString()));
}
sb.append("\":");