Skip to content
This repository was archived by the owner on Dec 15, 2024. It is now read-only.

Commit 5d691bd

Browse files
committed
changed JSONSerializationType.WritingOptions to WritingOption
1 parent c29aa58 commit 5d691bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/SwiftFoundation/JSONSerialization.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
/// JSON Serialization engine type.
1010
public protocol JSONSerializationType {
1111

12-
typealias WritingOptions
12+
typealias WritingOption
1313

1414
/// Serializes a ```JSON.Object``` to
15-
static func serialize(object: JSON.Object, options: WritingOptions) -> String
15+
static func serialize(object: JSON.Object, options: [WritingOption]) -> String
1616

17-
static func serialize(array: JSON.Array, options: WritingOptions) -> String
17+
static func serialize(array: JSON.Array, options: [WritingOption]) -> String
1818

1919
static func parse(string: String) -> JSON.Value?
2020
}
@@ -31,7 +31,7 @@ public extension JSON.Value {
3131
}
3232

3333
/// Convenience method for serializing JSON.
34-
public func toString<T: JSONSerializationType>(options: T.WritingOptions, _ engine: T.Type) -> Swift.String? {
34+
public func toString<T: JSONSerializationType>(options: [T.WritingOption] = [], _ engine: T.Type) -> Swift.String? {
3535

3636
switch self {
3737

0 commit comments

Comments
 (0)