 
 //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, _):

    }
}

// MARK: - Protocol conformances -

// MARK: Equatable

extension JSONValue: Equatable {
    @usableFromInline
    static func == (lhs: JSONValue, rhs: JSONValue) -> Bool {
        switch (lhs, rhs) {
        case (.null, .null):
            return true
        case (.bool(let lhs), .bool(let rhs)):
            return lhs == rhs
        case (.number(let lhs), .number(let rhs)):
            return lhs == rhs
        case (.string(let lhs), .string(let rhs)):
            return lhs == rhs
        case (.array(let lhs), .array(let rhs)):
            guard lhs.count == rhs.count else {
                return false
            }

            var lhsiterator = lhs.makeIterator()
            var rhsiterator = rhs.makeIterator()

            while let lhs = lhsiterator.next(), let rhs = rhsiterator.next() {
                if lhs == rhs {
                    continue
                }
                return false
            }

            return true
        case (.object(let lhs), .object(let rhs)):
            guard lhs.count == rhs.count else {
                return false
            }

            var lhsiterator = lhs.makeIterator()

            while let (lhskey, lhsvalue) = lhsiterator.next() {
                guard let rhsvalue = rhs[lhskey] else {
                    return false
                }

                if lhsvalue == rhsvalue {
                    continue
                }
                return false
            }

            return true
        default:
            return false
        }
    }
}

extension JSONValue {
    func toObjcRepresentation(options: JSONSerialization.ReadingOptions) throws -> Any {
        switch self {
        case .array(let values):

    case singleFragmentFoundButNotAllowed
}

private enum JSONValue {
    case string(String)
    case number(String)
    case bool(Bool)
