root / json-framework-3.2.0 / Classes / SBJsonStreamWriterState.h @ 3ebe9884
History | View | Annotate | Download (2.5 kB)
1 |
/*
|
---|---|
2 |
Copyright (c) 2010, Stig Brautaset.
|
3 |
All rights reserved.
|
4 |
|
5 |
Redistribution and use in source and binary forms, with or without
|
6 |
modification, are permitted provided that the following conditions are
|
7 |
met:
|
8 |
|
9 |
Redistributions of source code must retain the above copyright
|
10 |
notice, this list of conditions and the following disclaimer.
|
11 |
|
12 |
Redistributions in binary form must reproduce the above copyright
|
13 |
notice, this list of conditions and the following disclaimer in the
|
14 |
documentation and/or other materials provided with the distribution.
|
15 |
|
16 |
Neither the name of the the author nor the names of its contributors
|
17 |
may be used to endorse or promote products derived from this software
|
18 |
without specific prior written permission.
|
19 |
|
20 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
21 |
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
22 |
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
23 |
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
24 |
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
25 |
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
26 |
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
27 |
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
28 |
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
29 |
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
30 |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
31 |
*/
|
32 |
|
33 |
#import <Foundation/Foundation.h>
|
34 |
|
35 |
@class SBJsonStreamWriter;
|
36 |
|
37 |
@interface SBJsonStreamWriterState : NSObject
|
38 |
+ (id)sharedInstance; |
39 |
- (BOOL)isInvalidState:(SBJsonStreamWriter*)writer; |
40 |
- (void)appendSeparator:(SBJsonStreamWriter*)writer;
|
41 |
- (BOOL)expectingKey:(SBJsonStreamWriter*)writer; |
42 |
- (void)transitionState:(SBJsonStreamWriter*)writer;
|
43 |
- (void)appendWhitespace:(SBJsonStreamWriter*)writer;
|
44 |
@end
|
45 |
|
46 |
@interface SBJsonStreamWriterStateObjectStart : SBJsonStreamWriterState
|
47 |
@end
|
48 |
|
49 |
@interface SBJsonStreamWriterStateObjectKey : SBJsonStreamWriterStateObjectStart
|
50 |
@end
|
51 |
|
52 |
@interface SBJsonStreamWriterStateObjectValue : SBJsonStreamWriterState
|
53 |
@end
|
54 |
|
55 |
@interface SBJsonStreamWriterStateArrayStart : SBJsonStreamWriterState
|
56 |
@end
|
57 |
|
58 |
@interface SBJsonStreamWriterStateArrayValue : SBJsonStreamWriterState
|
59 |
@end
|
60 |
|
61 |
@interface SBJsonStreamWriterStateStart : SBJsonStreamWriterState
|
62 |
@end
|
63 |
|
64 |
@interface SBJsonStreamWriterStateComplete : SBJsonStreamWriterState
|
65 |
@end
|
66 |
|
67 |
@interface SBJsonStreamWriterStateError : SBJsonStreamWriterState
|
68 |
@end
|
69 |
|