YAJL JSON string generator.
More...
#import <YAJLGen.h>
List of all members.
Public Member Functions |
(id) | - initWithGenOptions:indentString: |
| JSON generator with options.
|
(void) | - object: |
| Write JSON for object to buffer.
|
(void) | - null |
| Write null value to buffer.
|
(void) | - bool: |
| Write bool value to buffer.
|
(void) | - number: |
| Write numeric value to buffer.
|
(void) | - string: |
| Write string value to buffer.
|
(void) | - startDictionary |
| Write dictionary start ('{') to buffer.
|
(void) | - endDictionary |
| Write dictionary end ('}') to buffer.
|
(void) | - startArray |
| Write array start ('[') to buffer.
|
(void) | - endArray |
| Write array end (']') to buffer.
|
(void) | - clear |
| Clear JSON buffer.
|
(NSString *) | - buffer |
| Get current JSON buffer.
|
Protected Attributes |
yajl_gen | gen_ |
YAJLGenOptions | genOptions_ |
Detailed Description
YAJL JSON string generator.
Supports the following types:
- NSArray
- NSDictionary
- NSString
- NSNumber
- NSNull
We also support the following types (if using YAJLGenOptionsIncludeUnsupportedTypes option), by converting to JSON supported types:
- NSDate: number representing number of milliseconds since (1970) epoch
- NSData: Base64 encoded string
- NSURL: URL (absolute) string
Member Function Documentation
Write bool value to buffer.
- Parameters:
-
- (id) initWithGenOptions: |
|
(YAJLGenOptions) |
genOptions |
indentString: |
|
(NSString *) |
indentString | |
|
|
| | |
JSON generator with options.
- Parameters:
-
| genOptions | Generate options
- YAJLGenOptionsNone: No options
- YAJLGenOptionsBeautify: Beautifiy JSON output
- YAJLGenOptionsIgnoreUnknownTypes: Ignore unknown types (will use null value)
- YAJLGenOptionsIncludeUnsupportedTypes: Handle non-JSON types (including NSDate, NSData, NSURL)
|
| indentString | String for indentation |
- (void) number: |
|
(NSNumber *) |
number |
|
|
Write numeric value to buffer.
- Parameters:
-
- (void) object: |
|
(id) |
obj |
|
|
Write JSON for object to buffer.
- Parameters:
-
| obj | Supported or custom object |
- (void) string: |
|
(NSString *) |
s |
|
|
Write string value to buffer.
- Parameters:
-
The documentation for this class was generated from the following files: