Json parsing is now supported in JSON5

typedef NS_OPTIONS(NSUInteger, NSJSONReadingOptions) { NSJSONReadingMutableContainers = (1UL << 0), NSJSONReadingMutableLeaves = (1UL << 1), NSJSONReadingFragmentsAllowed = (1UL << 2), NSJSONReadingJSON5Allowed API_AVAILABLE (macos (12.0), the ios (15.0), watchos (8.0), tvos (15.0)) = (1 ul < < 3), NSJSONReadingTopLevelDictionaryAssumed API_AVAILABLE (macos (12.0), the ios (15.0), watchos (8.0), tvos (15.0)) = (1 ul < < 4), NSJSONReadingAllowFragments API_DEPRECATED_WITH_REPLACEMENT (" NSJSONReadingFragmentsAllowed ", macos (10.7, API (5.0, API_TO_BE_DEPRECATED), ios(5.0, API_TO_BE_DEPRECATED), WATchos (2.0, API_TO_BE_DEPRECATED), TVOs (9.0, API_TO_BE_DEPRECATED)) = NSJSONReadingFragmentsAllowed,} API_AVAILABLE (macos (10.7), the ios (5.0), watchos (2.0), tvos (9.0));Copy the code

Json5 example:

{ // comments unquoted: 'and you can quote me on that', singleQuotes: 'I can use "double quotes" here', lineBreaks: "Look, Mom! \ No \\n's!" , hexadecimal: 0xdecaf, leadingDecimalPoint: .8675309, andTrailing: 8675309., positiveSign: +1, trailingComma: 'in objects', andIn: ['arrays',], "backwardsCompatible": "with JSON", }Copy the code

Support for comments, keys don’t have to be double quoted, etc.

2. UICellConfigurationState support Both UICollectionViewCell and UITableViewCell support block execution when the state changes.

3. UICollectionViewLayout supports automatic height; AutomaticDimension