NSDictionary+MTLJSONKeyPath.h 1003 B

123456789101112131415161718192021222324252627
  1. //
  2. // NSDictionary+MTLJSONKeyPath.h
  3. // Mantle
  4. //
  5. // Created by Robert Böhnke on 19/03/14.
  6. // Copyright (c) 2014 GitHub. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface NSDictionary (MTLJSONKeyPath)
  10. /// Looks up the value of a key path in the receiver.
  11. ///
  12. /// JSONKeyPath - The key path that should be resolved. Every element along this
  13. /// key path needs to be an instance of NSDictionary for the
  14. /// resolving to be successful.
  15. /// success - If not NULL, this will be set to a boolean indicating whether
  16. /// the key path was resolved successfully.
  17. /// error - If not NULL, this may be set to an error that occurs during
  18. /// resolving the value.
  19. ///
  20. /// Returns the value for the key path which may be nil. Clients should inspect
  21. /// the success parameter to decide how to proceed with the result.
  22. - (id)mtl_valueForJSONKeyPath:(NSString *)JSONKeyPath success:(BOOL *)success error:(NSError **)error;
  23. @end