-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathJSONDeeplyMutable.h
More file actions
51 lines (45 loc) · 1.82 KB
/
Copy pathJSONDeeplyMutable.h
File metadata and controls
51 lines (45 loc) · 1.82 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// JSONDeeplyMutable.h
// JSONTools
//
// Copyright (C) 2014 Gregory Combs [gcombs at gmail]
// See LICENSE.txt for details.
@import Foundation;
#import "NSArray+JSONDeepMutable.h"
#import "NSDictionary+JSONDeepMutable.h"
@interface JSONDeepMutable : NSObject
/**
* @private
* Use the NSArray+JSONDeepMutable and NSDictionary+JSONDeepMutable
* categories instead. This is an internal implementation that only operates
* on one instance of a container's content. Throws an exception if any
* interior value objects aren't copyable in some way. This method
* prefers NSMutableCopying over NSCopying whenever possible.
*
* @param oldValue A value object to (mutably) copy.
*
* @param throwsExceptions Conditionally throw exceptions if an interior
* object isn't mutable or copyable, otherwise it
* merely omits that object from the new collection.
*
* @return A (mutable) copy of the object.
*/
+ (id)copyAsDeeplyMutableValue:(id)oldValue throwsExceptions:(BOOL)throwsExceptions;
/**
* @private
* Use the NSArray+JSONDeepMutable and NSDictionary+JSONDeepMutable
* categories instead. This is an internal implementation that only operates
* on one instance of a container's content. Throws an exception if any
* interior value objects aren't copyable in some way. This method
* will ensure there are no mutable copies, only immutable.
*
* @param oldValue A value object to (immutably) copy.
*
* @param throwsExceptions Conditionally throw exceptions if an interior
* object isn't copyable, otherwise it
* merely omits that object from the new collection.
*
* @return An immutable copy of the object.
*/
+ (id)copyAsDeeplyImmutableValue:(id)oldValue throwsExceptions:(BOOL)throwsExceptions;
@end