Refine foundation imports
This commit is contained in:
parent
376d22000f
commit
54bd41f67c
|
|
@ -5,13 +5,17 @@
|
||||||
// Created by Christian Treffs on 22.07.20.
|
// Created by Christian Treffs on 22.07.20.
|
||||||
//
|
//
|
||||||
|
|
||||||
#if canImport(Foundation) && canImport(CoreFoundation)
|
#if canImport(Foundation)
|
||||||
import class Foundation.JSONEncoder
|
import Foundation
|
||||||
import class Foundation.JSONDecoder
|
#endif
|
||||||
|
#if canImport(CoreFoundation)
|
||||||
import class Foundation.PropertyListEncoder
|
import CoreFoundation
|
||||||
import class Foundation.PropertyListDecoder
|
#endif
|
||||||
|
#if canImport(SwiftFoundation)
|
||||||
|
import SwiftFoundation
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if canImport(Foundation) || canImport(CoreFoundation) || canImport(SwiftFoundation)
|
||||||
extension JSONEncoder: TopLevelEncoder { }
|
extension JSONEncoder: TopLevelEncoder { }
|
||||||
extension JSONDecoder: TopLevelDecoder { }
|
extension JSONDecoder: TopLevelDecoder { }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue