-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathJSONPointer.h
More file actions
31 lines (27 loc) · 883 Bytes
/
Copy pathJSONPointer.h
File metadata and controls
31 lines (27 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// JSONPointer.h
// based in part on CWJSONPointer by Jonathan Dring (MIT/Copyright (c) 2014)
//
// JSONTools
//
// Copyright (C) 2014 Gregory Combs [gcombs at gmail]
// See LICENSE.txt for details.
@import Foundation;
#import "NSArray+JSONPointer.h"
#import "NSDictionary+JSONPointer.h"
@interface JSONPointer : NSObject
/**
* Implements IETF RFC6901 - JSON Pointer
* @see https://tools.ietf.org/html/rfc6901
*
* The supplied collection (dictionary or array) returns a value corresponding to
* the supplied JSON Pointer reference.
*
* @param collection A collection (either dictionary or array).
*
* @param pointer A string in the form of a JSON Pointer, like "/foo/bar/0" or "#/foo"
*
* @return The pointer's corresponding content value (or nil) in the collection.
*/
+ (id)valueForCollection:(id)collection withJSONPointer:(NSString *)pointer;
@end