---
title: propertyList()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/nsstring/propertylist()
---

# propertyList()

Parses the receiver as a text representation of a property list, returning an NSString, NSData, NSArray, or NSDictionary object, according to the topmost element.

## Declaration

```swift
func propertyList() -> Any
```

## Return Value

Return Value A property list representation of returning an NSString, NSData, NSArray, or NSDictionary object, according to the topmost element.

## Discussion

Discussion The receiver must contain a string in a property list format. For a discussion of property list formats, see Property List Programming Guide. important: Raises an NSParseErrorException if the receiver cannot be parsed as a property list.

## See Also

### Related Documentation

- [string(withContentsOfFile:)](foundation/nsstring/string(withcontentsoffile:).md)

### Converting String Contents Into a Property List

- [propertyListFromStringsFileFormat()](foundation/nsstring/propertylistfromstringsfileformat().md)
