fixup! Fix failing tests
This commit is contained in:
parent
add7a83a0f
commit
c0a4273d5b
@ -31,7 +31,7 @@ enum JSONError : Error {
|
|||||||
|
|
||||||
extension Array {
|
extension Array {
|
||||||
func toJSON() throws -> Data {
|
func toJSON() throws -> Data {
|
||||||
if #available(iOSApplicationExtension 11.0, *) {
|
if #available(iOS 11.0, OSX 10.13, tvOS 11.0, *) {
|
||||||
return try JSONSerialization.data(withJSONObject: self, options: [.sortedKeys])
|
return try JSONSerialization.data(withJSONObject: self, options: [.sortedKeys])
|
||||||
} else {
|
} else {
|
||||||
return try JSONSerialization.data(withJSONObject: self, options: JSONSerialization.WritingOptions(rawValue: 0))
|
return try JSONSerialization.data(withJSONObject: self, options: JSONSerialization.WritingOptions(rawValue: 0))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user