00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include "yajl_gen.h"
00031
00032
00033 extern NSString *const YAJLGenInvalidObjectException;
00034
00036 enum YAJLGenOptions {
00037 YAJLGenOptionsNone = 0,
00038 YAJLGenOptionsBeautify = 1 << 0,
00039 YAJLGenOptionsIgnoreUnknownTypes = 1 << 1,
00040 YAJLGenOptionsIncludeUnsupportedTypes = 1 << 2,
00041 };
00042 typedef NSUInteger YAJLGenOptions;
00043
00059 @interface YAJLGen : NSObject {
00060 yajl_gen gen_;
00061
00062 YAJLGenOptions genOptions_;
00063 }
00064
00075 - (id)initWithGenOptions:(YAJLGenOptions)genOptions indentString:(NSString *)indentString;
00076
00081 - (void)object:(id)obj;
00082
00086 - (void)null;
00087
00092 - (void)bool:(BOOL)b;
00093
00098 - (void)number:(NSNumber *)number;
00099
00104 - (void)string:(NSString *)s;
00105
00109 - (void)startDictionary;
00110
00114 - (void)endDictionary;
00115
00119 - (void)startArray;
00120
00124 - (void)endArray;
00125
00129 - (void)clear;
00130
00134 - (NSString *)buffer;
00135
00136 @end
00137
00138
00163 @protocol YAJLCoding <NSObject>
00164
00169 - (id)JSON;
00170
00171 @end