     // Send SourceKit request
     var response = sendSourceKitRequest(request)
     response.removeValueForKey("key.syntaxmap")
-    replaceUIDsWithStringsInDictionary(&response)
+    processDictionary(&response)
     println(toJSON(response))
 }
 

        "key.request": sourcekitd_uid_get_from_cstr("source.request.editor.open"),
        "key.name": "",
        "key.sourcefile": file])
    let data = sendSourceKitRequest(request)["key.syntaxmap"] as NSData!

    // Get number of syntax tokens
    var tokens = 0
    data.getBytes(&tokens, range: NSRange(location: 8, length: 8))
    tokens = tokens >> 4

    var identifierOffsets = [Int]()

    for i in 0..<tokens {
        let parserOffset = 16 * i

        var uid = UInt64(0)
        data.getBytes(&uid, range: NSRange(location: 16 + parserOffset, length: 8))
        let type = stringForSourceKitUID(uid)!

        // Only append identifiers
        if type != "source.lang.swift.syntaxtype.identifier" {
            continue
        }
        var offset = 0
        data.getBytes(&offset, range: NSRange(location: 24 + parserOffset, length: 4))
        identifierOffsets.append(offset)
    }

    let fileContents = files[file]!
    let regex = NSRegularExpression(pattern: "(///.*\\n|\\*/\\n)", options: nil, error: nil)!
    let range = NSRange(location: 0, length: fileContents.length)
    let matches = regex.matchesInString(fileContents, options: nil, range: range)

    var offsets = [Int]()
    for match in matches {
        offsets.append(identifierOffsets.filter({ $0 >= match.range.location})[0])
    }
    return offsets
}

/**

}

/**
Print JSON and XML-formatted docs for the specified Swift file.

:param: arguments compiler arguments to pass to SourceKit
:param: file Path to Swift file to document
*/
func docs_for_swift_compiler_args(arguments: [String], file: String) {
    sourcekitd_initialize()

    // Construct SourceKit requests for getting general info about a Swift file and getting cursor info
