Utilities for loading JSON from resource bundles.
More...
#import <NSBundle+YAJL.h>
List of all members.
Detailed Description
Utilities for loading JSON from resource bundles.
id JSONValue = [[NSBundle mainBundle] yajl_JSONFromResource:@"kegs.json"];
Member Function Documentation
- (id) yajl_JSONFromResource: |
|
(NSString *) |
resource |
|
|
Load JSON from bundle.
- Parameters:
-
| resource | Resource name with extension, for example, file.json |
- Exceptions:
-
| YAJLParserException | On parse error |
- (id) yajl_JSONFromResource: |
|
(NSString *) |
resource |
options: |
|
(YAJLParserOptions) |
options |
error: |
|
(NSError **) |
error | |
|
|
| | |
Load JSON from bundle.
- Parameters:
-
| resource | Resource name with extension, for example, file.json |
| options | Parser options
- YAJLParserOptionsNone: No options
- YAJLParserOptionsAllowComments: Javascript style comments will be allowed in the input (both / / and //)
- YAJLParserOptionsCheckUTF8: Invalid UTF8 strings will cause a parse error
- YAJLParserOptionsStrictPrecision: If YES will force strict precision and return integer overflow error
|
| error | Out error |
- Returns:
- JSON value (NSArray, NSDictionary) or nil if errored
The documentation for this class was generated from the following files: