sogo/SoObjects/SOGo/NSDictionary+BSJSONAdditions.h
Wolfgang Sourdeau 09e4c3f2a9 Monotone-Parent: bcd29d180f0f481f03088f9e1fcb3066dcfdbcc9
Monotone-Revision: 367e72af9d08f48f2e598a1e344c784b6bc4ffac

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-11-26T19:31:07
Monotone-Branch: ca.inverse.sogo
2009-11-26 19:31:07 +00:00

50 lines
1.5 KiB
Objective-C

//
// BSJSONAdditions
//
// Created by Blake Seely on 2/1/06.
// Copyright 2006 Blake Seely - http://www.blakeseely.com All rights reserved.
// Permission to use this code:
//
// Feel free to use this code in your software, either as-is or
// in a modified form. Either way, please include a credit in
// your software's "About" box or similar, mentioning at least
// my name (Blake Seely).
//
// Permission to redistribute this code:
//
// You can redistribute this code, as long as you keep these
// comments. You can also redistribute modified versions of the
// code, as long as you add comments to say that you've made
// modifications (keeping these original comments too).
//
// If you do use or redistribute this code, an email would be
// appreciated, just to let me know that people are finding my
// code useful. You can reach me at blakeseely@mac.com
#import <Foundation/NSDictionary.h>
extern NSString *jsonIndentString;
extern const int jsonDoNotIndent;
@interface NSDictionary (BSJSONAdditions)
- (NSString *)jsonStringValue;
@end
@interface NSDictionary (PrivateBSJSONAdditions)
- (NSString *)jsonStringValueWithIndentLevel:(int)level;
- (NSString *)jsonStringForValue:(id)value withIndentLevel:(int)level;
- (NSString *)jsonStringForArray:(NSArray *)array withIndentLevel:(int)level;
- (NSString *)jsonStringForString:(NSString *)string;
- (NSString *)jsonIndentStringForLevel:(int)level;
@end
@interface NSMutableDictionary (BSJSONAdditions)
+ (NSMutableDictionary *)dictionaryWithJSONString:(NSString *)jsonString;
@end