/vendor/TouchJSON/Experimental/CJSONSerialization.h
C Header | 34 lines | 19 code | 8 blank | 7 comment | 0 complexity | 3c80b016d1a39e2be86a6591d9d1db5d MD5 | raw file
1// 2// CJSONSerialization.h 3// TouchJSON 4// 5// Created by Jonathan Wight on 03/04/11. 6// Copyright 2011 toxicsoftware.com. All rights reserved. 7// 8 9#import <Foundation/Foundation.h> 10 11enum { 12 kCJSONReadingMutableContainers = 0x1, 13 kCJSONReadingMutableLeaves = 0x2, 14 kCJSONReadingAllowFragments = 0x04, 15}; 16typedef NSUInteger EJSONReadingOptions; 17 18enum { 19 kCJJSONWritingPrettyPrinted = 0x1 20}; 21typedef NSUInteger EJSONWritingOptions; 22 23 24@interface CJSONSerialization : NSObject { 25 26} 27 28+ (BOOL)isValidJSONObject:(id)obj; 29+ (NSData *)dataWithJSONObject:(id)obj options:(EJSONWritingOptions)opt error:(NSError **)error; 30+ (id)JSONObjectWithData:(NSData *)data options:(EJSONReadingOptions)opt error:(NSError **)error; 31+ (NSInteger)writeJSONObject:(id)obj toStream:(NSOutputStream *)stream options:(EJSONWritingOptions)opt error:(NSError **)error; 32+ (id)JSONObjectWithStream:(NSInputStream *)stream options:(EJSONReadingOptions)opt error:(NSError **)error; 33 34@end