Index

RBPropertyList.h

Classes


RBPropertyList

Convenience methods for working with property lists.

Functions

Retrieves the value in the given property list at the given key path with indexes. e.g. results.products[0].name
@param propertyList : The property list to extract the value from.
@param keyPath : The key path with indexes at which the value is expected.
@returns The resulting value, or nil if nothing was found.
+ (nullable id)valueWithPropertyList:(nonnull id)propertyList

Removes NSNull values from the property list recursively.
@param propertyList : The property list to remove NSNull values from.
@returns The new property list with NSNull values removed.
+ (nonnull id)propertyListByRemovingNullValues:(nonnull id)propertyList;

Analyses two property lists to determine the differences between them.
@param fromPropertyList : The source property list to analyse.
@param toPropertyList : The destination property list to analyse.
@param additionDiffPropertyList : The items that were added to the destination as compared with the source.
@param removalDiffPropertyList : The items that were removed in the destination as compared with the source.
@param inclusiveDiff : If items are equal same setting this means that the are included in the additionDiff irrespective.
+ (void)diffFromPropertyList:(nonnull id)fromPropertyList

Transforms a property list.
@param propertyList : The property list to transform.
@param dictionaryModifierBlock : An optional block that is called on all dictionaries enabling their modification.
@param valueModifierBlock : An optional block that is called on all non-dictionary values, enabling their modification.
@returns The modified property list.
+ (nonnull id)transformPropertyList:(nonnull id)propertyList