 
 //MARK: - Encoding Detection
 
-internal extension JSONSerialization {
-    
+private extension JSONSerialization {
     /// Detect the encoding format of the NSData contents
     static func detectEncoding(_ bytes: UnsafeRawBufferPointer) -> String.Encoding {
-
         if bytes.count >= 4 {
             switch (bytes[0], bytes[1], bytes[2], bytes[3]) {
             case (0, 0, 0, _):

    }
}

extension JSONParserImpl {
    
    @usableFromInline struct DocumentReader {
        @usableFromInline let array: [UInt8]
        @usableFromInline let count: Int

        @usableFromInline /* private(set) */ var index: Int = -1
        @usableFromInline /* private(set) */ var value: UInt8?

        @inlinable init<Bytes: Collection>(bytes: Bytes) where Bytes.Element == UInt8 {
            if let array = bytes as? [UInt8] {
                self.array = array
            } else {
                self.array = Array(bytes)
            }

            self.count = self.array.count
        }

        @inlinable subscript(bounds: Range<Int>) -> ArraySlice<UInt8> {
            self.array[bounds]
        }

        @inlinable mutating func read() -> (UInt8, Int)? {
            guard self.index < self.count - 1 else {
                self.value = nil
                self.index = self.array.endIndex

            }
        }

        mutating func parseUnicodeSequence() throws -> (Unicode.Scalar, Int) {
            // we build this for utf8 only for now.
            let bitPattern = try parseUnicodeHexSequence()

