We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26ca2e3 commit 2b85609Copy full SHA for 2b85609
Sources/Segment/Utilities/JSON.swift
@@ -51,7 +51,7 @@ public enum JSON: Equatable {
51
}
52
53
// handle swift types
54
- case nil:
+ case Optional<Any>.none:
55
self = .null
56
case let url as URL:
57
self = .string(url.absoluteString)
Tests/Segment-Tests/JSON_Tests.swift
@@ -53,7 +53,7 @@ class JSONTests: XCTestCase {
func testJSONNil() throws {
- let traits = try JSON(["type": NSNull(), "preferences": ["bwack"]])
+ let traits = try JSON(["type": NSNull(), "preferences": ["bwack"], "key": nil])
let encoder = JSONEncoder()
58
encoder.outputFormatting = .prettyPrinted
59
0 commit comments