Returns a Foundation object from JSON data in a given stream.
- iOS 5.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
A stream from which to read JSON data.
The stream should be opened and configured.
Options for reading the JSON data and creating the Foundation objects.
For possible values, see
If an error occurs, upon return contains an
NSErrorobject with code
NSPropertythat describes the problem.
List Read Corrupt Error
A Foundation object from the JSON data in
The data in the stream must be in one of the 5 supported encodings listed in the JSON specification: UTF-8, UTF-16LE, UTF-16BE, UTF-32LE, UTF-32BE. The data may or may not have a BOM. The most efficient encoding to use for parsing is UTF-8, so if you have a choice in encoding the data passed to this method, use UTF-8.