Open Classswift 6.0.3Foundation
JSONSerialization
class JSONSerialization
class JSONSerialization
import Foundation
class NSObject
The root class of most Foundation class hierarchies.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol NSObjectProtocol : AnyObject
The NSObjectProtocol
groups methods that are fundamental to all Foundation objects.
class func data(withJSONObject value: Any, options opt: JSONSerialization.WritingOptions = []) throws -> Data
class func isValidJSONObject(_ obj: Any) -> Bool
class func jsonObject(with data: Data, options opt: JSONSerialization.ReadingOptions = []) throws -> Any
class func jsonObject(with stream: InputStream, options opt: JSONSerialization.ReadingOptions = []) throws -> Any
class func writeJSONObject(_ obj: Any, toStream stream: OutputStream, options opt: JSONSerialization.WritingOptions) throws -> Int
struct ReadingOptions
struct WritingOptions
import NIOFoundationCompat
static func jsonObject(with buffer: ByteBuffer, options: JSONSerialization.ReadingOptions = []) throws -> Any
Attempts to derive a Foundation object from a ByteBuffer and return it as T
.