Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing project for new iOS/Xcode.

Removing old example projects.
  • Loading branch information...
commit 29c91797005ce0c7eb914333662c5ce3721347af 1 parent 0c66026
@gabriel authored
Showing with 1,607 additions and 9,163 deletions.
  1. +0 −2  Example/TestApp/English.lproj/InfoPlist.strings
  2. +0 −4,119 Example/TestApp/English.lproj/MainMenu.xib
  3. +0 −1  Example/TestApp/Frameworks/YAJL.framework/Headers
  4. +0 −1  Example/TestApp/Frameworks/YAJL.framework/Resources
  5. +0 −62 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/NSBundle+YAJL.h
  6. +0 −154 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/NSObject+YAJL.h
  7. +0 −212 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/YAJL.h
  8. +0 −196 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/YAJLDocument.h
  9. +0 −171 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/YAJLGen.h
  10. +0 −181 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/YAJLParser.h
  11. +0 −85 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/yajl_common.h
  12. +0 −159 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/yajl_gen.h
  13. +0 −193 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/yajl_parse.h
  14. +0 −23 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/yajl_version.h
  15. BIN  Example/TestApp/Frameworks/YAJL.framework/Versions/A/Resources/English.lproj/InfoPlist.strings
  16. +0 −22 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Resources/Info.plist
  17. BIN  Example/TestApp/Frameworks/YAJL.framework/Versions/A/YAJL
  18. +0 −1  Example/TestApp/Frameworks/YAJL.framework/Versions/Current
  19. +0 −1  Example/TestApp/Frameworks/YAJL.framework/YAJL
  20. +0 −32 Example/TestApp/TestApp-Info.plist
  21. +0 −317 Example/TestApp/TestApp.xcodeproj/project.pbxproj
  22. +0 −17 Example/TestApp/TestAppAppDelegate.h
  23. +0 −22 Example/TestApp/TestAppAppDelegate.m
  24. +0 −7 Example/TestApp/TestApp_Prefix.pch
  25. +0 −14 Example/TestApp/main.m
  26. +0 −22 Example/TestAppIOS/Classes/TestAppIOSAppDelegate.h
  27. +0 −91 Example/TestAppIOS/Classes/TestAppIOSAppDelegate.m
  28. +0 −16 Example/TestAppIOS/Classes/TestAppIOSViewController.h
  29. +0 −65 Example/TestAppIOS/Classes/TestAppIOSViewController.m
  30. +0 −1  Example/TestAppIOS/Frameworks/YAJLiOS.framework/Headers
  31. +0 −1  Example/TestAppIOS/Frameworks/YAJLiOS.framework/Resources
  32. +0 −62 Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/A/Headers/NSBundle+YAJL.h
  33. +0 −154 Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/A/Headers/NSObject+YAJL.h
  34. +0 −212 Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/A/Headers/YAJL.h
  35. +0 −196 Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/A/Headers/YAJLDocument.h
  36. +0 −171 Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/A/Headers/YAJLGen.h
  37. +0 −181 Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/A/Headers/YAJLParser.h
  38. +0 −85 Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/A/Headers/yajl_common.h
  39. +0 −159 Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/A/Headers/yajl_gen.h
  40. +0 −193 Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/A/Headers/yajl_parse.h
  41. +0 −23 Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/A/Headers/yajl_version.h
  42. +0 −18 Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/A/Resources/Info.plist
  43. BIN  Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/A/YAJLiOS
  44. +0 −1  Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/Current
  45. +0 −1  Example/TestAppIOS/Frameworks/YAJLiOS.framework/YAJLiOS
  46. +0 −444 Example/TestAppIOS/MainWindow.xib
  47. +0 −30 Example/TestAppIOS/TestAppIOS-Info.plist
  48. +0 −276 Example/TestAppIOS/TestAppIOS.xcodeproj/project.pbxproj
  49. +0 −156 Example/TestAppIOS/TestAppIOSViewController.xib
  50. +0 −8 Example/TestAppIOS/TestAppIOS_Prefix.pch
  51. +0 −17 Example/TestAppIOS/main.m
  52. +1 −1  Makefile
  53. BIN  Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/GHUnitIOS
  54. +59 −35 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHAsyncTestCase.h
  55. +49 −0 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHImageDiffView.h
  56. +46 −0 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHMockNSHTTPURLResponse.h
  57. +167 −0 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHMockNSURLConnection.h
  58. +6 −2 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHTest+JUnitXML.h
  59. +107 −16 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHTest.h
  60. +62 −42 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHTestCase.h
  61. +5 −1 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHTestGroup+JUnitXML.h
  62. +52 −17 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHTestGroup.h
  63. +272 −233 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHTestMacros.h
  64. +6 −1 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHTestOperation.h
  65. +84 −22 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHTestRunner.h
  66. +8 −4 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHTestSuite.h
  67. +218 −0 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHTestViewModel.h
  68. +21 −8 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHTesting.h
  69. +41 −0 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHUIImageViewControl.h
  70. +6 −1 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHUnit.h
  71. +0 −3  Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHUnitIOS.h
  72. +42 −0 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHUnitIOSAppDelegate.h
  73. +7 −3 ...tIOS.framework/Versions/A/Headers/{GHUnitIPhoneTableViewDataSource.h → GHUnitIOSTableViewDataSource.h}
  74. +59 −0 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHUnitIOSTestView.h
  75. +11 −4 ...nitIOS.framework/Versions/A/Headers/{GHUnitIPhoneTestViewController.h → GHUnitIOSTestViewController.h}
  76. +8 −3 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/{GHUnitIPhoneView.h → GHUnitIOSView.h}
  77. +15 −13 ...ries/GHUnitIOS.framework/Versions/A/Headers/{GHUnitIPhoneViewController.h → GHUnitIOSViewController.h}
  78. +6 −9 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHUnitIPhoneAppDelegate.h
  79. +136 −0 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHViewTestCase.h
  80. +11 −2 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/NSException+GHTestFailureExceptions.h
  81. +5 −1 Project-iOS/Libraries/GHUnitIOS.framework/Versions/A/Headers/NSValue+GHValueFormatter.h
  82. +1 −1  Project-iOS/Tests_Prefix.pch
  83. +7 −23 Project-iOS/YAJLiOS.xcodeproj/project.pbxproj
  84. +5 −1 Project/YAJL.xcodeproj/project.pbxproj
  85. +0 −81 Tests/GHUnitIOSTestMain.m
  86. +44 −52 Tests/GHUnitTestMain.m
  87. +1 −1  Tests/YAJLDocumentDelegateTest.m
  88. +1 −1  Tests/YAJLDocumentTest.m
  89. +0 −5 Tests/YAJLParserTest.m
  90. +36 −0 Tests/main.m
  91. +1 −1  XCConfig/Shared-iOS.xcconfig
  92. +1 −1  XCConfig/Shared.xcconfig
View
2  Example/TestApp/English.lproj/InfoPlist.strings
@@ -1,2 +0,0 @@
-/* Localized versions of Info.plist keys */
-
View
4,119 Example/TestApp/English.lproj/MainMenu.xib
0 additions, 4,119 deletions not shown
View
1  Example/TestApp/Frameworks/YAJL.framework/Headers
View
1  Example/TestApp/Frameworks/YAJL.framework/Resources
View
62 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/NSBundle+YAJL.h
@@ -1,62 +0,0 @@
-//
-// NSBundle+YAJL.h
-// YAJL
-//
-// Created by Gabriel Handford on 7/23/09.
-// Copyright 2009. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#import "YAJLParser.h"
-
-/*!
- Utilities for loading JSON from resource bundles.
-
- @code
- id JSONValue = [[NSBundle mainBundle] yajl_JSONFromResource:@"kegs.json"];
- @endcode
- */
-@interface NSBundle(YAJL)
-
-/*!
- Load JSON from bundle.
- @param resource Resource name with extension, for example, file.json
- @throws YAJLParserException On parse error
- */
-- (id)yajl_JSONFromResource:(NSString *)resource;
-
-/*!
- Load JSON from bundle.
- @param resource Resource name with extension, for example, file.json
- @param options Parser options
- - YAJLParserOptionsNone: No options
- - YAJLParserOptionsAllowComments: Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //)
- - YAJLParserOptionsCheckUTF8: Invalid UTF8 strings will cause a parse error
- - YAJLParserOptionsStrictPrecision: If YES will force strict precision and return integer overflow error
-
- @param error Out error
- @result JSON value (NSArray, NSDictionary) or nil if errored
- */
-- (id)yajl_JSONFromResource:(NSString *)resource options:(YAJLParserOptions)options error:(NSError **)error;
-
-@end
View
154 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/NSObject+YAJL.h
@@ -1,154 +0,0 @@
-//
-// NSObject+YAJL.h
-// YAJL
-//
-// Created by Gabriel Handford on 7/23/09.
-// Copyright 2009. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#import "YAJLGen.h"
-#import "YAJLParser.h"
-
-/*!
- Generate JSON string from NSArray, NSDictionary or custom object or parse JSON from NSString or custom object.
-
- Parse JSON:
- @code
- NSData *JSONData = [NSData dataWithContentsOfFile:@"example.json"];
- NSArray *arrayFromData = [JSONData yajl_JSON];
-
- NSString *JSONString = @"[\"Test\"]";
- NSArray *arrayFromString = [JSONString yajl_JSON];
-
- // With options and out error
- NSError *error = nil;
- NSArray *arrayFromString = [JSONString yajl_JSONWithOptions:YAJLParserOptionsAllowComments error:&error];
- @endcode
-
- Generate JSON:
- @code
- NSDictionary *dict = [NSDictionary dictionaryWithObject:@"value" forKey:@"key"];
- NSString *JSONString = [dict yajl_JSONString];
-
- // Beautified with custon indent string
- NSArray *array = [NSArray arrayWithObjects:@"value1", @"value2", nil];
- NSString *JSONString = [dict yajl_JSONStringWithOptions:YAJLGenOptionsBeautify indentString:@" "];
- @endcode
- */
-@interface NSObject(YAJL)
-
-#pragma mark Gen
-
-/*!
- Create JSON string from object.
- Supported objects include: NSArray, NSDictionary, NSNumber, NSString, NSNull
- To override JSON value to encode (or support custom objects), implement (id)JSON; See YAJLCoding in YAJLGen.h
- @throws YAJLGenInvalidObjectException If object is invalid
- @result JSON String
- */
-- (NSString *)yajl_JSONString;
-
-/*!
- Create JSON string from object.
- Supported objects include: NSArray, NSDictionary, NSNumber, NSString, NSNull
- To override JSON value to encode (or support custom objects), implement (id)JSON; See YAJLCoding in YAJLGen.h
- @throws YAJLGenInvalidObjectException If object is invalid
- @param 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)
-
- @param indentString
- @result JSON String
- */
-- (NSString *)yajl_JSONStringWithOptions:(YAJLGenOptions)options indentString:(NSString *)indentString;
-
-
-#pragma mark Parsing
-
-/*!
- Parse JSON (NSString or NSData or dataUsingEncoding:).
- @result JSON object
- @throws YAJLParserException If a parse error occured
- @throws YAJLParsingUnsupportedException If not NSData or doesn't respond to dataUsingEncoding:
-
- @code
- NSString *JSONString = @"{'foo':['bar', true]}";
- id JSONValue = [JSONString yajl_JSON];
-
- NSData *JSONData = ...;
- id JSONValue = [JSONData yajl_JSON];
- @endcode
- */
-- (id)yajl_JSON;
-
-/*!
- Parse JSON (NSString or NSData or dataUsingEncoding:) with out error.
-
- If an error occurs, the returned object will be the current state of the object when
- the error occurred.
-
- @param error Error to set if we failed to parse
- @result JSON object
- @throws YAJLParserException If a parse error occured
- @throws YAJLParsingUnsupportedException If not NSData or doesn't respond to dataUsingEncoding:
-
- @code
- NSString *JSONString = @"{'foo':['bar', true]}";
- NSError *error = nil;
- [JSONString yajl_JSON:error];
- if (error) ...;
- @endcode
- */
-- (id)yajl_JSON:(NSError **)error;
-
-/*!
- Parse JSON (NSString or NSData or dataUsingEncoding:) with options and out error.
-
- If an error occurs, the returned object will be the current state of the object when
- the error occurred.
-
- @param options Parse options
- - YAJLParserOptionsNone: No options
- - YAJLParserOptionsAllowComments: Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //)
- - YAJLParserOptionsCheckUTF8: Invalid UTF8 strings will cause a parse error
- - YAJLParserOptionsStrictPrecision: If YES will force strict precision and return integer overflow error
-
- @param error Error to set if we failed to parse
- @result JSON object
- @throws YAJLParserException If a parse error occured
- @throws YAJLParsingUnsupportedException If not NSData or doesn't respond to dataUsingEncoding:
-
- @code
- NSString *JSONString = @"{'foo':['bar', true]} // comment";
- NSError *error = nil;
- [JSONString yajl_JSONWithOptions:YAJLParserOptionsAllowComments error:error];
- if (error) ...;
- @endcode
- */
-- (id)yajl_JSONWithOptions:(YAJLParserOptions)options error:(NSError **)error;
-
-@end
-
View
212 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/YAJL.h
@@ -1,212 +0,0 @@
-//
-// YAJL.h
-// YAJL
-//
-// Created by Gabriel Handford on 7/23/09.
-// Copyright 2009. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#import "YAJLParser.h"
-#import "YAJLDocument.h"
-#import "YAJLGen.h"
-#import "NSObject+YAJL.h"
-#import "NSBundle+YAJL.h"
-
-/*!
- @mainpage YAJL
-
- The YAJL framework is an Objective-C wrapper around the http://lloyd.github.com/yajl/ SAX-style JSON parser.
-
- @section Links
-
- Source: http://github.com/gabriel/yajl-objc
-
- View docs online: http://gabriel.github.com/yajl-objc/
-
- YAJL C docs: http://lloyd.github.com/yajl/
-
- @section Usage Usage
-
- To use the framework (for Mac OS X or iOS):
-
- @code
- // For Mac OS X
- #import <YAJL/YAJL.h>
- // For iOS
- #import <YAJLiOS/YAJL.h>
- @endcode
-
- @section Examples Examples
-
- @subsection Example1 To parse JSON from NSData
-
- @code
- NSData *JSONData = [NSData dataWithContentsOfFile:@"example.json"];
- NSArray *arrayFromData = [JSONData yajl_JSON];
- @endcode
-
- @subsection Example2 To parse JSON from NSString
-
- @code
- NSString *JSONString = @"[1, 2, 3]";
- NSArray *arrayFromString = [JSONString yajl_JSON];
- @endcode
-
- @subsection Example2 To parse JSON from NSString with error and comments
-
- @code
- // With options and out error
- NSString *JSONString = @"[1, 2, 3] // Allow comments";
- NSError *error = nil;
- NSArray *arrayFromString = [JSONString yajl_JSONWithOptions:YAJLParserOptionsAllowComments error:&error];
- @endcode
-
- @subsection Example3 To generate JSON from an object, NSArray, NSDictionary, etc.
-
- @code
- NSDictionary *dict = [NSDictionary dictionaryWithObject:@"value" forKey:@"key"];
- NSString *JSONString = [dict yajl_JSONString];
- @endcode
-
- @subsection Example4 To generate JSON from an object, beautified with custom indent
-
- @code
- // Beautified with custon indent string
- NSArray *array = [NSArray arrayWithObjects:@"value1", @"value2", nil];
- NSString *JSONString = [dict yajl_JSONStringWithOptions:YAJLGenOptionsBeautify indentString:@" "];
- @endcode
-
- @subsection Example5 To use the streaming (or SAX style) parser, use YAJLParser
-
- @code
- NSData *data = [NSData dataWithContentsOfFile:@"example.json"];
-
- YAJLParser *parser = [[YAJLParser alloc] initWithParserOptions:YAJLParserOptionsAllowComments];
- parser.delegate = self;
- [parser parse:data];
- if (parser.parserError)
- NSLog(@"Error:\n%@", parser.parserError);
-
- parser.delegate = nil;
- [parser release];
-
- // Include delegate methods from YAJLParserDelegate
- - (void)parserDidStartDictionary:(YAJLParser *)parser { }
- - (void)parserDidEndDictionary:(YAJLParser *)parser { }
-
- - (void)parserDidStartArray:(YAJLParser *)parser { }
- - (void)parserDidEndArray:(YAJLParser *)parser { }
-
- - (void)parser:(YAJLParser *)parser didMapKey:(NSString *)key { }
- - (void)parser:(YAJLParser *)parser didAdd:(id)value { }
- @endcode
-
- @subsection ParserOptions Parser Options
-
- There are options when parsing that can be specified with YAJLParser#initWithParserOptions:.
-
- - YAJLParserOptionsAllowComments: Allows comments in JSON
- - YAJLParserOptionsCheckUTF8: Will verify UTF-8
- - YAJLParserOptionsStrictPrecision: Will force strict precision and return integer overflow error, if number is greater than long long.
-
- @subsection Example6 Parsing as data becomes available
-
- @code
- YAJLParser *parser = [[[YAJLParser alloc] init] autorelease];
- parser.delegate = self;
-
- // A chunk of data comes...
- YAJLParserStatus status = [parser parse:chunk1];
- // 'status' should be YAJLParserStatusInsufficientData, if its not finished
- if (parser.parserError)
- NSLog(@"Error:\n%@", parser.parserError);
-
- // Another chunk of data comes...
- YAJLParserStatus status = [parser parse:chunk2];
- // 'status' should be YAJLParserStatusOK if its finished
- if (parser.parserError)
- NSLog(@"Error:\n%@", parser.parserError);
- @endcode
-
- @subsection Example7 Document style parsing
-
- To use the document style, use YAJLDocument. Usage should be very similar to NSXMLDocument.
-
- @code
- NSData *data = [NSData dataWithContentsOfFile:@"example.json"];
- NSError *error = nil;
- YAJLDocument *document = [[YAJLDocument alloc] initWithData:data parserOptions:YAJLParserOptionsNone error:&error];
- // Access root element at document.root
- NSLog(@"Root: %@", document.root);
- [document release];
- @endcode
-
- @subsection Example8 Document style parsing as data becomes available
-
- @code
- YAJLDocument *document = [[YAJLDocument alloc] init];
- document.delegate = self;
-
- NSError *error = nil;
- [document parse:chunk1 error:error];
- [document parse:chunk2 error:error];
-
- // You can access root element at document.root
- NSLog(@"Root: %@", document.root);
- [document release];
-
- // Or via the YAJLDocumentDelegate delegate methods
-
- - (void)document:(YAJLDocument *)document didAddDictionary:(NSDictionary *)dict { }
- - (void)document:(YAJLDocument *)document didAddArray:(NSArray *)array { }
- - (void)document:(YAJLDocument *)document didAddObject:(id)object toArray:(NSArray *)array { }
- - (void)document:(YAJLDocument *)document didSetObject:(id)object forKey:(id)key inDictionary:(NSDictionary *)dict { }
- @endcode
-
- @subsection Example9 Load JSON from Bundle
-
- @code
- id JSONValue = [[NSBundle mainBundle] yajl_JSONFromResource:@"kegs.json"];
- @endcode
-
- @section CustomizedEncoding Customized Encoding
-
- To implement JSON encodable value for custom objects or override for existing objects, implement <tt>- (id)JSON;</tt>
-
- For example:
-
- @code
- @interface CustomObject : NSObject
- @end
-
- @implementation CustomObject
-
- - (id)JSON {
- return [NSArray arrayWithObject:[NSNumber numberWithInteger:1]];
- }
-
- @end
- @endcode
-
- */
View
196 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/YAJLDocument.h
@@ -1,196 +0,0 @@
-//
-// YAJLDecoder.h
-// YAJL
-//
-// Created by Gabriel Handford on 3/1/09.
-// Copyright 2009. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#include "YAJLParser.h"
-
-typedef enum {
- YAJLDecoderCurrentTypeNone,
- YAJLDecoderCurrentTypeArray,
- YAJLDecoderCurrentTypeDict
-} YAJLDecoderCurrentType;
-
-extern NSInteger YAJLDocumentStackCapacity;
-
-@class YAJLDocument;
-
-/*!
- YAJLDocument delegate notified when objects are added.
- */
-@protocol YAJLDocumentDelegate <NSObject>
-@optional
-/*!
- Did add dictionary.
- @param document Sender
- @param dict Dictionary that was added
- */
-- (void)document:(YAJLDocument *)document didAddDictionary:(NSDictionary *)dict;
-
-/*!
- Did add array.
- @param document Sender
- @param array Array that was added
- */
-- (void)document:(YAJLDocument *)document didAddArray:(NSArray *)array;
-
-/*!
- Did add object to array.
- @param document Sender
- @param object Object added
- @param array Array objct was added to
- */
-- (void)document:(YAJLDocument *)document didAddObject:(id)object toArray:(NSArray *)array;
-
-/*!
- Did set object for key on dictionary.
- @param document Sender
- @param object Object that was set
- @param key Key
- @param dict Dictionary object was set for key on
- */
-- (void)document:(YAJLDocument *)document didSetObject:(id)object forKey:(id)key inDictionary:(NSDictionary *)dict;
-@end
-
-/*!
- JSON document interface.
-
- @code
- NSData *data = [NSData dataWithContentsOfFile:@"example.json"];
- NSError *error = nil;
- YAJLDocument *document = [[YAJLDocument alloc] initWithData:data parserOptions:YAJLParserOptionsNone error:&error];
- // Access root element at document.root
- NSLog(@"Root: %@", document.root);
- [document release];
- @endcode
-
- Example for streaming:
- @code
- YAJLDocument *document = [[YAJLDocument alloc] init];
- document.delegate = self;
-
- NSError *error = nil;
- [document parse:chunk1 error:error];
- [document parse:chunk2 error:error];
-
- // You can access root element at document.root
- NSLog(@"Root: %@", document.root);
- [document release];
-
- // Or via the YAJLDocumentDelegate delegate methods
-
- - (void)document:(YAJLDocument *)document didAddDictionary:(NSDictionary *)dict { }
- - (void)document:(YAJLDocument *)document didAddArray:(NSArray *)array { }
- - (void)document:(YAJLDocument *)document didAddObject:(id)object toArray:(NSArray *)array { }
- - (void)document:(YAJLDocument *)document didSetObject:(id)object forKey:(id)key inDictionary:(NSDictionary *)dict { }
- @endcode
- */
-@interface YAJLDocument : NSObject <YAJLParserDelegate> {
-
- id root_; // NSArray or NSDictionary
- YAJLParser *parser_;
-
- // TODO(gabe): This should be __weak
- id<YAJLDocumentDelegate> delegate_;
-
- __weak NSMutableDictionary *dict_; // weak; if map in progress, points to the current map
- __weak NSMutableArray *array_; // weak; If array in progress, points the current array
- __weak NSString *key_; // weak; If map in progress, points to current key
-
- NSMutableArray *stack_;
- NSMutableArray *keyStack_;
-
- YAJLDecoderCurrentType currentType_;
-
- YAJLParserStatus parserStatus_;
-
-}
-
-@property (readonly, nonatomic) id root; //! The root element of the document, either NSArray or NSDictionary
-@property (readonly, nonatomic) YAJLParserStatus parserStatus; //! The current status of parsing
-@property (assign, nonatomic) id<YAJLDocumentDelegate> delegate; //! Delegate
-
-/*!
- Create document from data.
- @param data Data to parse
- @param parserOptions Parse options
- - YAJLParserOptionsNone: No options
- - YAJLParserOptionsAllowComments: Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //)
- - YAJLParserOptionsCheckUTF8: Invalid UTF8 strings will cause a parse error
- - YAJLParserOptionsStrictPrecision: If YES will force strict precision and return integer overflow error
- @param error Error to set on failure
- */
-- (id)initWithData:(NSData *)data parserOptions:(YAJLParserOptions)parserOptions error:(NSError **)error;
-
-/*!
- Create document from data.
- @param data Data to parse
- @param parserOptions Parse options
- - YAJLParserOptionsNone: No options
- - YAJLParserOptionsAllowComments: Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //)
- - YAJLParserOptionsCheckUTF8: Invalid UTF8 strings will cause a parse error
- - YAJLParserOptionsStrictPrecision: If YES will force strict precision and return integer overflow error
- @param capacity Initial capacity for NSArray and NSDictionary objects (Defaults to 20)
- @param error Error to set on failure
- */
-- (id)initWithData:(NSData *)data parserOptions:(YAJLParserOptions)parserOptions capacity:(NSInteger)capacity error:(NSError **)error;
-
-/*!
- Create empty document with parser options.
- @param parserOptions Parse options
- - YAJLParserOptionsNone: No options
- - YAJLParserOptionsAllowComments: Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //)
- - YAJLParserOptionsCheckUTF8: Invalid UTF8 strings will cause a parse error
- - YAJLParserOptionsStrictPrecision: If YES will force strict precision and return integer overflow error
- */
-- (id)initWithParserOptions:(YAJLParserOptions)parserOptions;
-
-/*!
- Create empty document with parser options.
- @param parserOptions Parse options
- - YAJLParserOptionsNone: No options
- - YAJLParserOptionsAllowComments: Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //)
- - YAJLParserOptionsCheckUTF8: Invalid UTF8 strings will cause a parse error
- - YAJLParserOptionsStrictPrecision: If YES will force strict precision and return integer overflow error
- @param capacity Initial capacity for NSArray and NSDictionary objects (Defaults to 20)
- */
-- (id)initWithParserOptions:(YAJLParserOptions)parserOptions capacity:(NSInteger)capacity;
-
-/*!
- Parse data.
- @param data Data to parse
- @param error Out error to set on failure
- @result Parser status
- - YAJLParserStatusNone: No status
- - YAJLParserStatusOK: Parsed OK
- - YAJLParserStatusInsufficientData: There was insufficient data
- - YAJLParserStatusError: Parser errored
- */
-- (YAJLParserStatus)parse:(NSData *)data error:(NSError **)error;
-
-@end
View
171 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/YAJLGen.h
@@ -1,171 +0,0 @@
-//
-// YAJLGen.h
-// YAJL
-//
-// Created by Gabriel Handford on 7/19/09.
-// Copyright 2009. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#include "yajl_gen.h"
-
-
-extern NSString *const YAJLGenInvalidObjectException; //! Exception type if we encounter invalid object
-
-//! JSON generate options
-enum YAJLGenOptions {
- YAJLGenOptionsNone = 0, //!< No options
- YAJLGenOptionsBeautify = 1 << 0, //!< Beautifiy JSON output
- YAJLGenOptionsIgnoreUnknownTypes = 1 << 1, //!< Ignore unknown types (will use null value)
- YAJLGenOptionsIncludeUnsupportedTypes = 1 << 2, //!< Handle non-JSON types (including NSDate, NSData, NSURL)
-};
-typedef NSUInteger YAJLGenOptions;
-
-/*!
- 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
- */
-@interface YAJLGen : NSObject {
- yajl_gen gen_;
-
- YAJLGenOptions genOptions_;
-}
-
-/*!
- JSON generator with options.
- @param 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)
-
- @param indentString String for indentation
- */
-- (id)initWithGenOptions:(YAJLGenOptions)genOptions indentString:(NSString *)indentString;
-
-/*!
- Write JSON for object to buffer.
- @param obj Supported or custom object
- */
-- (void)object:(id)obj;
-
-/*!
- Write null value to buffer.
- */
-- (void)null;
-
-/*!
- Write bool value to buffer.
- @param b Output true or false
- */
-- (void)bool:(BOOL)b;
-
-/*!
- Write numeric value to buffer.
- @param number Numeric value
- */
-- (void)number:(NSNumber *)number;
-
-/*!
- Write string value to buffer.
- @param s String value
- */
-- (void)string:(NSString *)s;
-
-/*!
- Write dictionary start ('{') to buffer.
- */
-- (void)startDictionary;
-
-/*!
- Write dictionary end ('}') to buffer.
- */
-- (void)endDictionary;
-
-/*!
- Write array start ('[') to buffer.
- */
-- (void)startArray;
-
-/*!
- Write array end (']') to buffer.
- */
-- (void)endArray;
-
-/*!
- Clear JSON buffer.
- */
-- (void)clear;
-
-/*!
- Get current JSON buffer.
- */
-- (NSString *)buffer;
-
-@end
-
-
-/*!
- Custom objects can support manual JSON encoding.
-
- @code
- @interface CustomObject : NSObject
- @end
-
- @implementation CustomObject
-
- - (id)JSON {
- return [NSArray arrayWithObject:[NSNumber numberWithInteger:1]];
- }
-
- @end
- @endcode
-
- And then:
-
- @code
- CustomObject *customObject = [[CustomObject alloc] init];
- NSString *JSONString = [customObject yajl_JSON];
- // JSONString == "[1]";
- @endcode
- */
-@protocol YAJLCoding <NSObject>
-
-/*!
- Provide custom and/or encodable object to parse to JSON string.
- @result Object encodable as JSON such as NSDictionary, NSArray, etc
- */
-- (id)JSON;
-
-@end
View
181 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/YAJLParser.h
@@ -1,181 +0,0 @@
-//
-// YAJLParser.h
-// YAJL
-//
-// Created by Gabriel Handford on 6/14/09.
-// Copyright 2009. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#include "yajl_parse.h"
-
-
-extern NSString *const YAJLErrorDomain; //! Error domain for YAJL
-extern NSString *const YAJLParserException; //! Generic parse exception
-extern NSString *const YAJLParsingUnsupportedException; //! Parsing unsupported exception
-
-extern NSString *const YAJLParserValueKey; //! Key in NSError userInfo for value we errored on
-
-//! Parser error codes
-enum YAJLParserErrorCode {
- YAJLParserErrorCodeAllocError = -1000, //!< Alloc error
- YAJLParserErrorCodeDoubleOverflow = -1001, //!< Double overflow
- YAJLParserErrorCodeIntegerOverflow = -1002 //!< Integer overflow
-};
-typedef NSInteger YAJLParserErrorCode; //! Parser error codes
-
-//! Parser options
-enum YAJLParserOptions {
- YAJLParserOptionsNone = 0, //!< No options
- YAJLParserOptionsAllowComments = 1 << 0, //!< Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //)
- YAJLParserOptionsCheckUTF8 = 1 << 1, //!< Invalid UTF8 strings will cause a parse error
- YAJLParserOptionsStrictPrecision = 1 << 2, //!< If YES will force strict precision and return integer overflow error
-};
-typedef NSUInteger YAJLParserOptions; //! Parser options
-
-//! Parser status
-enum {
- YAJLParserStatusNone = 0, //!< No status
- YAJLParserStatusOK = 1, //!< Parsed OK
- YAJLParserStatusInsufficientData = 2, //!< There was insufficient data
- YAJLParserStatusError = 3 //!< Parser errored
-};
-typedef NSUInteger YAJLParserStatus; //!< Status of the last parse event
-
-
-@class YAJLParser;
-
-/*!
- Delegate for YAJL JSON parser.
- */
-@protocol YAJLParserDelegate <NSObject>
-
-/*!
- Parser did start dictionary.
- @param parser Sender
- */
-- (void)parserDidStartDictionary:(YAJLParser *)parser;
-
-/*!
- Parser did end dictionary.
- @param parser Sender
- */
-- (void)parserDidEndDictionary:(YAJLParser *)parser;
-
-/*!
- Parser did start array.
- @param parser Sender
- */
-- (void)parserDidStartArray:(YAJLParser *)parser;
-
-/*!
- Parser did end array.
- @param parser Sender
- */
-- (void)parserDidEndArray:(YAJLParser *)parser;
-
-/*!
- Parser did map key.
- @param parser Sender
- @param key Key that was mapped
- */
-- (void)parser:(YAJLParser *)parser didMapKey:(NSString *)key;
-
-/*!
- Did add value.
- @param parser Sender
- @param value Value of type NSNull, NSString or NSNumber
- */
-- (void)parser:(YAJLParser *)parser didAdd:(id)value;
-
-@end
-
-/*!
- JSON parser.
-
- @code
- NSData *data = [NSData dataWithContentsOfFile:@"example.json"];
-
- YAJLParser *parser = [[YAJLParser alloc] initWithParserOptions:YAJLParserOptionsAllowComments];
- parser.delegate = self;
- [parser parse:data];
- if (parser.parserError) {
- NSLog(@"Error:\n%@", parser.parserError);
- }
-
- parser.delegate = nil;
- [parser release];
-
- // Include delegate methods from YAJLParserDelegate
- - (void)parserDidStartDictionary:(YAJLParser *)parser { }
- - (void)parserDidEndDictionary:(YAJLParser *)parser { }
-
- - (void)parserDidStartArray:(YAJLParser *)parser { }
- - (void)parserDidEndArray:(YAJLParser *)parser { }
-
- - (void)parser:(YAJLParser *)parser didMapKey:(NSString *)key { }
- - (void)parser:(YAJLParser *)parser didAdd:(id)value { }
- @endcode
- */
-@interface YAJLParser : NSObject {
-
- yajl_handle handle_;
-
- __weak id <YAJLParserDelegate> delegate_; // weak
-
- YAJLParserOptions parserOptions_;
-
- NSError *parserError_;
-}
-
-@property (assign, nonatomic) __weak id <YAJLParserDelegate> delegate;
-@property (readonly, retain, nonatomic) NSError *parserError;
-@property (readonly, nonatomic) YAJLParserOptions parserOptions;
-
-/*!
- Create parser with data and options.
- @param parserOptions Parser options
- - YAJLParserOptionsNone: No options
- - YAJLParserOptionsAllowComments: Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //)
- - YAJLParserOptionsCheckUTF8: Invalid UTF8 strings will cause a parse error
- - YAJLParserOptionsStrictPrecision: If YES will force strict precision and return integer overflow error
- */
-- (id)initWithParserOptions:(YAJLParserOptions)parserOptions;
-
-/*!
- Parse data.
-
- If streaming, you can call parse multiple times as long as
- previous calls return YAJLParserStatusInsufficientData.
-
- @param data
- @result Parser status
- - YAJLParserStatusNone: No status
- - YAJLParserStatusOK: Parsed OK
- - YAJLParserStatusInsufficientData: There was insufficient data
- - YAJLParserStatusError: Parser errored
- */
-- (YAJLParserStatus)parse:(NSData *)data;
-
-@end
View
85 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/yajl_common.h
@@ -1,85 +0,0 @@
-/*
- * Copyright 2010, Lloyd Hilaiel.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. Neither the name of Lloyd Hilaiel nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __YAJL_COMMON_H__
-#define __YAJL_COMMON_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define YAJL_MAX_DEPTH 128
-
-/* msft dll export gunk. To build a DLL on windows, you
- * must define WIN32, YAJL_SHARED, and YAJL_BUILD. To use a shared
- * DLL, you must define YAJL_SHARED and WIN32 */
-#if defined(WIN32) && defined(YAJL_SHARED)
-# ifdef YAJL_BUILD
-# define YAJL_API __declspec(dllexport)
-# else
-# define YAJL_API __declspec(dllimport)
-# endif
-#else
-# define YAJL_API
-#endif
-
-/** pointer to a malloc function, supporting client overriding memory
- * allocation routines */
-typedef void * (*yajl_malloc_func)(void *ctx, unsigned int sz);
-
-/** pointer to a free function, supporting client overriding memory
- * allocation routines */
-typedef void (*yajl_free_func)(void *ctx, void * ptr);
-
-/** pointer to a realloc function which can resize an allocation. */
-typedef void * (*yajl_realloc_func)(void *ctx, void * ptr, unsigned int sz);
-
-/** A structure which can be passed to yajl_*_alloc routines to allow the
- * client to specify memory allocation functions to be used. */
-typedef struct
-{
- /** pointer to a function that can allocate uninitialized memory */
- yajl_malloc_func malloc;
- /** pointer to a function that can resize memory allocations */
- yajl_realloc_func realloc;
- /** pointer to a function that can free memory allocated using
- * reallocFunction or mallocFunction */
- yajl_free_func free;
- /** a context pointer that will be passed to above allocation routines */
- void * ctx;
-} yajl_alloc_funcs;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
View
159 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/yajl_gen.h
@@ -1,159 +0,0 @@
-/*
- * Copyright 2010, Lloyd Hilaiel.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. Neither the name of Lloyd Hilaiel nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * \file yajl_gen.h
- * Interface to YAJL's JSON generation facilities.
- */
-
-#include <yajl/yajl_common.h>
-
-#ifndef __YAJL_GEN_H__
-#define __YAJL_GEN_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
- /** generator status codes */
- typedef enum {
- /** no error */
- yajl_gen_status_ok = 0,
- /** at a point where a map key is generated, a function other than
- * yajl_gen_string was called */
- yajl_gen_keys_must_be_strings,
- /** YAJL's maximum generation depth was exceeded. see
- * YAJL_MAX_DEPTH */
- yajl_max_depth_exceeded,
- /** A generator function (yajl_gen_XXX) was called while in an error
- * state */
- yajl_gen_in_error_state,
- /** A complete JSON document has been generated */
- yajl_gen_generation_complete,
- /** yajl_gen_double was passed an invalid floating point value
- * (infinity or NaN). */
- yajl_gen_invalid_number,
- /** A print callback was passed in, so there is no internal
- * buffer to get from */
- yajl_gen_no_buf
- } yajl_gen_status;
-
- /** an opaque handle to a generator */
- typedef struct yajl_gen_t * yajl_gen;
-
- /** a callback used for "printing" the results. */
- typedef void (*yajl_print_t)(void * ctx,
- const char * str,
- unsigned int len);
-
- /** configuration structure for the generator */
- typedef struct {
- /** generate indented (beautiful) output */
- unsigned int beautify;
- /** an opportunity to define an indent string. such as \\t or
- * some number of spaces. default is four spaces ' '. This
- * member is only relevant when beautify is true */
- const char * indentString;
- } yajl_gen_config;
-
- /** allocate a generator handle
- * \param config a pointer to a structure containing parameters which
- * configure the behavior of the json generator
- * \param allocFuncs an optional pointer to a structure which allows
- * the client to overide the memory allocation
- * used by yajl. May be NULL, in which case
- * malloc/free/realloc will be used.
- *
- * \returns an allocated handle on success, NULL on failure (bad params)
- */
- YAJL_API yajl_gen yajl_gen_alloc(const yajl_gen_config * config,
- const yajl_alloc_funcs * allocFuncs);
-
- /** allocate a generator handle that will print to the specified
- * callback rather than storing the results in an internal buffer.
- * \param callback a pointer to a printer function. May be NULL
- * in which case, the results will be store in an
- * internal buffer.
- * \param config a pointer to a structure containing parameters
- * which configure the behavior of the json
- * generator.
- * \param allocFuncs an optional pointer to a structure which allows
- * the client to overide the memory allocation
- * used by yajl. May be NULL, in which case
- * malloc/free/realloc will be used.
- * \param ctx a context pointer that will be passed to the
- * printer callback.
- *
- * \returns an allocated handle on success, NULL on failure (bad params)
- */
- YAJL_API yajl_gen yajl_gen_alloc2(const yajl_print_t callback,
- const yajl_gen_config * config,
- const yajl_alloc_funcs * allocFuncs,
- void * ctx);
-
- /** free a generator handle */
- YAJL_API void yajl_gen_free(yajl_gen handle);
-
- YAJL_API yajl_gen_status yajl_gen_integer(yajl_gen hand, long int number);
- /** generate a floating point number. number may not be infinity or
- * NaN, as these have no representation in JSON. In these cases the
- * generator will return 'yajl_gen_invalid_number' */
- YAJL_API yajl_gen_status yajl_gen_double(yajl_gen hand, double number);
- YAJL_API yajl_gen_status yajl_gen_number(yajl_gen hand,
- const char * num,
- unsigned int len);
- YAJL_API yajl_gen_status yajl_gen_string(yajl_gen hand,
- const unsigned char * str,
- unsigned int len);
- YAJL_API yajl_gen_status yajl_gen_null(yajl_gen hand);
- YAJL_API yajl_gen_status yajl_gen_bool(yajl_gen hand, int boolean);
- YAJL_API yajl_gen_status yajl_gen_map_open(yajl_gen hand);
- YAJL_API yajl_gen_status yajl_gen_map_close(yajl_gen hand);
- YAJL_API yajl_gen_status yajl_gen_array_open(yajl_gen hand);
- YAJL_API yajl_gen_status yajl_gen_array_close(yajl_gen hand);
-
- /** access the null terminated generator buffer. If incrementally
- * outputing JSON, one should call yajl_gen_clear to clear the
- * buffer. This allows stream generation. */
- YAJL_API yajl_gen_status yajl_gen_get_buf(yajl_gen hand,
- const unsigned char ** buf,
- unsigned int * len);
-
- /** clear yajl's output buffer, but maintain all internal generation
- * state. This function will not "reset" the generator state, and is
- * intended to enable incremental JSON outputing. */
- YAJL_API void yajl_gen_clear(yajl_gen hand);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
View
193 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/yajl_parse.h
@@ -1,193 +0,0 @@
-/*
- * Copyright 2010, Lloyd Hilaiel.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. Neither the name of Lloyd Hilaiel nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * \file yajl_parse.h
- * Interface to YAJL's JSON parsing facilities.
- */
-
-#include <yajl/yajl_common.h>
-
-#ifndef __YAJL_PARSE_H__
-#define __YAJL_PARSE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
- /** error codes returned from this interface */
- typedef enum {
- /** no error was encountered */
- yajl_status_ok,
- /** a client callback returned zero, stopping the parse */
- yajl_status_client_canceled,
- /** The parse cannot yet complete because more json input text
- * is required, call yajl_parse with the next buffer of input text.
- * (pertinent only when stream parsing) */
- yajl_status_insufficient_data,
- /** An error occured during the parse. Call yajl_get_error for
- * more information about the encountered error */
- yajl_status_error
- } yajl_status;
-
- /** attain a human readable, english, string for an error */
- YAJL_API const char * yajl_status_to_string(yajl_status code);
-
- /** an opaque handle to a parser */
- typedef struct yajl_handle_t * yajl_handle;
-
- /** yajl is an event driven parser. this means as json elements are
- * parsed, you are called back to do something with the data. The
- * functions in this table indicate the various events for which
- * you will be called back. Each callback accepts a "context"
- * pointer, this is a void * that is passed into the yajl_parse
- * function which the client code may use to pass around context.
- *
- * All callbacks return an integer. If non-zero, the parse will
- * continue. If zero, the parse will be canceled and
- * yajl_status_client_canceled will be returned from the parse.
- *
- * Note about handling of numbers:
- * yajl will only convert numbers that can be represented in a double
- * or a long int. All other numbers will be passed to the client
- * in string form using the yajl_number callback. Furthermore, if
- * yajl_number is not NULL, it will always be used to return numbers,
- * that is yajl_integer and yajl_double will be ignored. If
- * yajl_number is NULL but one of yajl_integer or yajl_double are
- * defined, parsing of a number larger than is representable
- * in a double or long int will result in a parse error.
- */
- typedef struct {
- int (* yajl_null)(void * ctx);
- int (* yajl_boolean)(void * ctx, int boolVal);
- int (* yajl_integer)(void * ctx, long integerVal);
- int (* yajl_double)(void * ctx, double doubleVal);
- /** A callback which passes the string representation of the number
- * back to the client. Will be used for all numbers when present */
- int (* yajl_number)(void * ctx, const char * numberVal,
- unsigned int numberLen);
-
- /** strings are returned as pointers into the JSON text when,
- * possible, as a result, they are _not_ null padded */
- int (* yajl_string)(void * ctx, const unsigned char * stringVal,
- unsigned int stringLen);
-
- int (* yajl_start_map)(void * ctx);
- int (* yajl_map_key)(void * ctx, const unsigned char * key,
- unsigned int stringLen);
- int (* yajl_end_map)(void * ctx);
-
- int (* yajl_start_array)(void * ctx);
- int (* yajl_end_array)(void * ctx);
- } yajl_callbacks;
-
- /** configuration structure for the generator */
- typedef struct {
- /** if nonzero, javascript style comments will be allowed in
- * the json input, both slash star and slash slash */
- unsigned int allowComments;
- /** if nonzero, invalid UTF8 strings will cause a parse
- * error */
- unsigned int checkUTF8;
- } yajl_parser_config;
-
- /** allocate a parser handle
- * \param callbacks a yajl callbacks structure specifying the
- * functions to call when different JSON entities
- * are encountered in the input text. May be NULL,
- * which is only useful for validation.
- * \param config configuration parameters for the parse.
- * \param ctx a context pointer that will be passed to callbacks.
- */
- YAJL_API yajl_handle yajl_alloc(const yajl_callbacks * callbacks,
- const yajl_parser_config * config,
- const yajl_alloc_funcs * allocFuncs,
- void * ctx);
-
- /** free a parser handle */
- YAJL_API void yajl_free(yajl_handle handle);
-
- /** Parse some json!
- * \param hand - a handle to the json parser allocated with yajl_alloc
- * \param jsonText - a pointer to the UTF8 json text to be parsed
- * \param jsonTextLength - the length, in bytes, of input text
- */
- YAJL_API yajl_status yajl_parse(yajl_handle hand,
- const unsigned char * jsonText,
- unsigned int jsonTextLength);
-
- /** Parse any remaining buffered json.
- * Since yajl is a stream-based parser, without an explicit end of
- * input, yajl sometimes can't decide if content at the end of the
- * stream is valid or not. For example, if "1" has been fed in,
- * yajl can't know whether another digit is next or some character
- * that would terminate the integer token.
- *
- * \param hand - a handle to the json parser allocated with yajl_alloc
- */
- YAJL_API yajl_status yajl_parse_complete(yajl_handle hand);
-
- /** get an error string describing the state of the
- * parse.
- *
- * If verbose is non-zero, the message will include the JSON
- * text where the error occured, along with an arrow pointing to
- * the specific char.
- *
- * \returns A dynamically allocated string will be returned which should
- * be freed with yajl_free_error
- */
- YAJL_API unsigned char * yajl_get_error(yajl_handle hand, int verbose,
- const unsigned char * jsonText,
- unsigned int jsonTextLength);
-
- /**
- * get the amount of data consumed from the last chunk passed to YAJL.
- *
- * In the case of a successful parse this can help you understand if
- * the entire buffer was consumed (which will allow you to handle
- * "junk at end of input".
- *
- * In the event an error is encountered during parsing, this function
- * affords the client a way to get the offset into the most recent
- * chunk where the error occured. 0 will be returned if no error
- * was encountered.
- */
- YAJL_API unsigned int yajl_get_bytes_consumed(yajl_handle hand);
-
- /** free an error returned from yajl_get_error */
- YAJL_API void yajl_free_error(yajl_handle hand, unsigned char * str);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
View
23 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Headers/yajl_version.h
@@ -1,23 +0,0 @@
-#ifndef YAJL_VERSION_H_
-#define YAJL_VERSION_H_
-
-#include <yajl/yajl_common.h>
-
-#define YAJL_MAJOR 1
-#define YAJL_MINOR 0
-#define YAJL_MICRO 11
-
-#define YAJL_VERSION ((YAJL_MAJOR * 10000) + (YAJL_MINOR * 100) + YAJL_MICRO)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern int YAJL_API yajl_version(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* YAJL_VERSION_H_ */
-
View
BIN  Example/TestApp/Frameworks/YAJL.framework/Versions/A/Resources/English.lproj/InfoPlist.strings
Binary file not shown
View
22 Example/TestApp/Frameworks/YAJL.framework/Versions/A/Resources/Info.plist
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>YAJL</string>
- <key>CFBundleIdentifier</key>
- <string>me.rel.YAJL</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>YAJL</string>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleSignature</key>
- <string>GABE</string>
- <key>CFBundleVersion</key>
- <string>0.2.26</string>
-</dict>
-</plist>
View
BIN  Example/TestApp/Frameworks/YAJL.framework/Versions/A/YAJL
Binary file not shown
View
1  Example/TestApp/Frameworks/YAJL.framework/Versions/Current
View
1  Example/TestApp/Frameworks/YAJL.framework/YAJL
View
32 Example/TestApp/TestApp-Info.plist
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1</string>
- <key>LSMinimumSystemVersion</key>
- <string>${MACOSX_DEPLOYMENT_TARGET}</string>
- <key>NSMainNibFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
-</dict>
-</plist>
View
317 Example/TestApp/TestApp.xcodeproj/project.pbxproj
@@ -1,317 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 45;
- objects = {
-
-/* Begin PBXBuildFile section */
- 00155A8B12348E1A00B240AE /* YAJL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00155A8A12348E1A00B240AE /* YAJL.framework */; };
- 00155AEE1234911300B240AE /* YAJL.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 00155A8A12348E1A00B240AE /* YAJL.framework */; };
- 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
- 256AC3DA0F4B6AC300CF3369 /* TestAppAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* TestAppAppDelegate.m */; };
- 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
- 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
- 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 00155B001234911D00B240AE /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 10;
- files = (
- 00155AEE1234911300B240AE /* YAJL.framework in CopyFiles */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 00155A8A12348E1A00B240AE /* YAJL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = YAJL.framework; path = Frameworks/YAJL.framework; sourceTree = "<group>"; };
- 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
- 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
- 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
- 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
- 256AC3D80F4B6AC300CF3369 /* TestAppAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestAppAppDelegate.h; sourceTree = "<group>"; };
- 256AC3D90F4B6AC300CF3369 /* TestAppAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestAppAppDelegate.m; sourceTree = "<group>"; };
- 256AC3F00F4B6AF500CF3369 /* TestApp_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestApp_Prefix.pch; sourceTree = "<group>"; };
- 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
- 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
- 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
- 8D1107310486CEB800E47090 /* TestApp-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TestApp-Info.plist"; sourceTree = "<group>"; };
- 8D1107320486CEB800E47090 /* TestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 8D11072E0486CEB800E47090 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
- 00155A8B12348E1A00B240AE /* YAJL.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 080E96DDFE201D6D7F000001 /* Classes */ = {
- isa = PBXGroup;
- children = (
- 256AC3D80F4B6AC300CF3369 /* TestAppAppDelegate.h */,
- 256AC3D90F4B6AC300CF3369 /* TestAppAppDelegate.m */,
- );
- name = Classes;
- sourceTree = "<group>";
- };
- 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
- isa = PBXGroup;
- children = (
- 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
- );
- name = "Linked Frameworks";
- sourceTree = "<group>";
- };
- 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
- isa = PBXGroup;
- children = (
- 29B97324FDCFA39411CA2CEA /* AppKit.framework */,
- 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
- 29B97325FDCFA39411CA2CEA /* Foundation.framework */,
- );
- name = "Other Frameworks";
- sourceTree = "<group>";
- };
- 19C28FACFE9D520D11CA2CBB /* Products */ = {
- isa = PBXGroup;
- children = (
- 8D1107320486CEB800E47090 /* TestApp.app */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- 29B97314FDCFA39411CA2CEA /* TestApp */ = {
- isa = PBXGroup;
- children = (
- 080E96DDFE201D6D7F000001 /* Classes */,
- 29B97315FDCFA39411CA2CEA /* Other Sources */,
- 29B97317FDCFA39411CA2CEA /* Resources */,
- 29B97323FDCFA39411CA2CEA /* Frameworks */,
- 19C28FACFE9D520D11CA2CBB /* Products */,
- );
- name = TestApp;
- sourceTree = "<group>";
- };
- 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
- isa = PBXGroup;
- children = (
- 256AC3F00F4B6AF500CF3369 /* TestApp_Prefix.pch */,
- 29B97316FDCFA39411CA2CEA /* main.m */,
- );
- name = "Other Sources";
- sourceTree = "<group>";
- };
- 29B97317FDCFA39411CA2CEA /* Resources */ = {
- isa = PBXGroup;
- children = (
- 8D1107310486CEB800E47090 /* TestApp-Info.plist */,
- 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
- 1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
- );
- name = Resources;
- sourceTree = "<group>";
- };
- 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 00155A8A12348E1A00B240AE /* YAJL.framework */,
- 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
- 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
- );
- name = Frameworks;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 8D1107260486CEB800E47090 /* TestApp */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "TestApp" */;
- buildPhases = (
- 8D1107290486CEB800E47090 /* Resources */,
- 8D11072C0486CEB800E47090 /* Sources */,
- 8D11072E0486CEB800E47090 /* Frameworks */,
- 00155B001234911D00B240AE /* CopyFiles */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = TestApp;
- productInstallPath = "$(HOME)/Applications";
- productName = TestApp;
- productReference = 8D1107320486CEB800E47090 /* TestApp.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 29B97313FDCFA39411CA2CEA /* Project object */ = {
- isa = PBXProject;
- buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TestApp" */;
- compatibilityVersion = "Xcode 3.1";
- developmentRegion = English;
- hasScannedForEncodings = 1;
- knownRegions = (
- English,
- Japanese,
- French,
- German,
- );
- mainGroup = 29B97314FDCFA39411CA2CEA /* TestApp */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 8D1107260486CEB800E47090 /* TestApp */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 8D1107290486CEB800E47090 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
- 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 8D11072C0486CEB800E47090 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8D11072D0486CEB800E47090 /* main.m in Sources */,
- 256AC3DA0F4B6AC300CF3369 /* TestAppAppDelegate.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
- 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
- isa = PBXVariantGroup;
- children = (
- 089C165DFE840E0CC02AAC07 /* English */,
- );
- name = InfoPlist.strings;
- sourceTree = "<group>";
- };
- 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {
- isa = PBXVariantGroup;
- children = (
- 1DDD58150DA1D0A300B32029 /* English */,
- );
- name = MainMenu.xib;
- sourceTree = "<group>";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- C01FCF4B08A954540054247B /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- COPY_PHASE_STRIP = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "\"$(SRCROOT)/Frameworks\"",
- );
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_ENABLE_FIX_AND_CONTINUE = YES;
- GCC_MODEL_TUNING = G5;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = TestApp_Prefix.pch;
- INFOPLIST_FILE = "TestApp-Info.plist";
- INSTALL_PATH = "$(HOME)/Applications";
- LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
- PRODUCT_NAME = TestApp;
- };
- name = Debug;
- };
- C01FCF4C08A954540054247B /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "\"$(SRCROOT)/Frameworks\"",
- );
- GCC_MODEL_TUNING = G5;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = TestApp_Prefix.pch;
- INFOPLIST_FILE = "TestApp-Info.plist";
- INSTALL_PATH = "$(HOME)/Applications";
- PRODUCT_NAME = TestApp;
- };
- name = Release;
- };
- C01FCF4F08A954540054247B /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- ONLY_ACTIVE_ARCH = YES;
- PREBINDING = NO;
- SDKROOT = macosx10.6;
- };
- name = Debug;
- };
- C01FCF5008A954540054247B /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- PREBINDING = NO;
- SDKROOT = macosx10.6;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "TestApp" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- C01FCF4B08A954540054247B /* Debug */,
- C01FCF4C08A954540054247B /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TestApp" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- C01FCF4F08A954540054247B /* Debug */,
- C01FCF5008A954540054247B /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
-}
View
17 Example/TestApp/TestAppAppDelegate.h
@@ -1,17 +0,0 @@
-//
-// TestAppAppDelegate.h
-// TestApp
-//
-// Created by Gabriel Handford on 9/5/10.
-// Copyright 2010 Yelp. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
-@interface TestAppAppDelegate : NSObject <NSApplicationDelegate> {
- NSWindow *window;
-}
-
-@property (assign) IBOutlet NSWindow *window;
-
-@end
View
22 Example/TestApp/TestAppAppDelegate.m
@@ -1,22 +0,0 @@
-//
-// TestAppAppDelegate.m
-// TestApp
-//
-// Created by Gabriel Handford on 9/5/10.
-// Copyright 2010 Yelp. All rights reserved.
-//
-
-#import "TestAppAppDelegate.h"
-
-#import <YAJL/YAJL.h>
-
-@implementation TestAppAppDelegate
-
-@synthesize window;
-
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
- NSArray *test = [NSArray arrayWithObjects:@"one", @"two", @"three", nil];
- NSLog(@"%@", [test yajl_JSONString]);
-}
-
-@end
View
7 Example/TestApp/TestApp_Prefix.pch
@@ -1,7 +0,0 @@
-//
-// Prefix header for all source files of the 'TestApp' target in the 'TestApp' project
-//
-
-#ifdef __OBJC__
- #import <Cocoa/Cocoa.h>
-#endif
View
14 Example/TestApp/main.m
@@ -1,14 +0,0 @@
-//
-// main.m
-// TestApp
-//
-// Created by Gabriel Handford on 9/5/10.
-// Copyright 2010 Yelp. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
-int main(int argc, char *argv[])
-{
- return NSApplicationMain(argc, (const char **) argv);
-}
View
22 Example/TestAppIOS/Classes/TestAppIOSAppDelegate.h
@@ -1,22 +0,0 @@
-//
-// TestAppIOSAppDelegate.h
-// TestAppIOS
-//
-// Created by Gabriel Handford on 11/2/10.
-// Copyright 2010 Yelp. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@class TestAppIOSViewController;
-
-@interface TestAppIOSAppDelegate : NSObject <UIApplicationDelegate> {
- UIWindow *window;
- TestAppIOSViewController *viewController;
-}
-
-@property (nonatomic, retain) IBOutlet UIWindow *window;
-@property (nonatomic, retain) IBOutlet TestAppIOSViewController *viewController;
-
-@end
-
View
91 Example/TestAppIOS/Classes/TestAppIOSAppDelegate.m
@@ -1,91 +0,0 @@
-//
-// TestAppIOSAppDelegate.m
-// TestAppIOS
-//
-// Created by Gabriel Handford on 11/2/10.
-// Copyright 2010 Yelp. All rights reserved.
-//
-
-#import "TestAppIOSAppDelegate.h"
-#import "TestAppIOSViewController.h"
-
-#import <YAJLiOS/YAJL.h>
-
-@implementation TestAppIOSAppDelegate
-
-@synthesize window;
-@synthesize viewController;
-
-
-#pragma mark -
-#pragma mark Application lifecycle
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
-
- NSArray *test = [NSArray arrayWithObjects:@"one", @"two", @"three", nil];
- NSLog(@"%@", [test yajl_JSONString]);
-
- // Add the view controller's view to the window and display.
- [window addSubview:viewController.view];
- [window makeKeyAndVisible];
-
- return YES;
-}
-
-
-- (void)applicationWillResignActive:(UIApplication *)application {
- /*
- Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
- Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
- */
-}
-
-
-- (void)applicationDidEnterBackground:(UIApplication *)application {
- /*
- Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
- If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
- */
-}
-
-
-- (void)applicationWillEnterForeground:(UIApplication *)application {
- /*
- Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
- */
-}
-
-
-- (void)applicationDidBecomeActive:(UIApplication *)application {
- /*
- Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
- */
-}
-
-
-- (void)applicationWillTerminate:(UIApplication *)application {
- /*
- Called when the application is about to terminate.
- See also applicationDidEnterBackground:.
- */
-}
-
-
-#pragma mark -
-#pragma mark Memory management
-
-- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
- /*
- Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
- */
-}
-
-
-- (void)dealloc {
- [viewController release];
- [window release];
- [super dealloc];
-}
-
-
-@end
View
16 Example/TestAppIOS/Classes/TestAppIOSViewController.h
@@ -1,16 +0,0 @@
-//
-// TestAppIOSViewController.h
-// TestAppIOS
-//
-// Created by Gabriel Handford on 11/2/10.
-// Copyright 2010 Yelp. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@interface TestAppIOSViewController : UIViewController {
-
-}
-
-@end
-
View
65 Example/TestAppIOS/Classes/TestAppIOSViewController.m
@@ -1,65 +0,0 @@
-//
-// TestAppIOSViewController.m
-// TestAppIOS
-//
-// Created by Gabriel Handford on 11/2/10.
-// Copyright 2010 Yelp. All rights reserved.
-//
-
-#import "TestAppIOSViewController.h"
-
-@implementation TestAppIOSViewController
-
-
-
-/*
-// The designated initializer. Override to perform setup that is required before the view is loaded.
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
- if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
- // Custom initialization
- }
- return self;
-}
-*/
-
-/*
-// Implement loadView to create a view hierarchy programmatically, without using a nib.
-- (void)loadView {
-}
-*/
-
-
-/*
-// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
-- (void)viewDidLoad {
- [super viewDidLoad];
-}
-*/
-
-
-/*
-// Override to allow orientations other than the default portrait orientation.
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
- // Return YES for supported orientations
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
-}
-*/
-
-- (void)didReceiveMemoryWarning {
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
-
- // Release any cached data, images, etc that aren't in use.
-}
-
-- (void)viewDidUnload {
- // Release any retained subviews of the main view.
- // e.g. self.myOutlet = nil;
-}
-
-
-- (void)dealloc {
- [super dealloc];
-}
-
-@end
View
1  Example/TestAppIOS/Frameworks/YAJLiOS.framework/Headers
View
1  Example/TestAppIOS/Frameworks/YAJLiOS.framework/Resources
View
62 Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/A/Headers/NSBundle+YAJL.h
@@ -1,62 +0,0 @@
-//
-// NSBundle+YAJL.h
-// YAJL
-//
-// Created by Gabriel Handford on 7/23/09.
-// Copyright 2009. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#import "YAJLParser.h"
-
-/*!
- Utilities for loading JSON from resource bundles.
-
- @code
- id JSONValue = [[NSBundle mainBundle] yajl_JSONFromResource:@"kegs.json"];
- @endcode
- */
-@interface NSBundle(YAJL)
-
-/*!
- Load JSON from bundle.
- @param resource Resource name with extension, for example, file.json
- @throws YAJLParserException On parse error
- */
-- (id)yajl_JSONFromResource:(NSString *)resource;
-
-/*!
- Load JSON from bundle.
- @param resource Resource name with extension, for example, file.json
- @param options Parser options
- - YAJLParserOptionsNone: No options
- - YAJLParserOptionsAllowComments: Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //)
- - YAJLParserOptionsCheckUTF8: Invalid UTF8 strings will cause a parse error
- - YAJLParserOptionsStrictPrecision: If YES will force strict precision and return integer overflow error
-
- @param error Out error
- @result JSON value (NSArray, NSDictionary) or nil if errored
- */
-- (id)yajl_JSONFromResource:(NSString *)resource options:(YAJLParserOptions)options error:(NSError **)error;
-
-@end
View
154 Example/TestAppIOS/Frameworks/YAJLiOS.framework/Versions/A/Headers/NSObject+YAJL.h
@@ -1,154 +0,0 @@
-//
-// NSObject+YAJL.h
-// YAJL
-//
-// Created by Gabriel Handford on 7/23/09.
-// Copyright 2009. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#import "YAJLGen.h"
-#import "YAJLParser.h"
-
-/*!
- Generate JSON string from NSArray, NSDictionary or custom object or parse JSON from NSString or custom object.
-
- Parse JSON:
- @code
- NSData *JSONData = [NSData dataWithContentsOfFile:@"example.json"];
- NSArray *arrayFromData = [JSONData yajl_JSON];
-
- NSString *JSONString = @"[\"Test\"]";
- NSArray *arrayFromString = [JSONString yajl_JSON];
-
- // With options and out error
- NSError *error = nil;
- NSArray *arrayFromString = [JSONString yajl_JSONWithOptions:YAJLParserOptionsAllowComments error:&error];
- @endcode
-
- Generate JSON:
- @code
- NSDictionary *dict = [NSDictionary dictionaryWithObject:@"value" forKey:@"key"];
- NSString *JSONString = [dict yajl_JSONString];
-
- // Beautified with custon indent string
- NSArray *array = [NSArray arrayWithObjects:@"value1", @"value2", nil];
- NSString *JSONString = [dict yajl_JSONStringWithOptions:YAJLGenOptionsBeautify indentString:@" "];
- @endcode
- */
-@interface NSObject(YAJL)
-
-#pragma mark Gen
-
-/*!
- Create JSON string from object.
- Supported objects include: NSArray, NSDictionary, NSNumber, NSString, NSNull
- To override JSON value to encode (or support custom objects), implement (id)JSON; See YAJLCoding in YAJLGen.h
- @throws YAJLGenInvalidObjectException If object is invalid
- @result JSON String
- */
-- (NSString *)yajl_JSONString;
-
-/*!
- Create JSON string from object.
- Supported objects include: NSArray, NSDictionary, NSNumber, NSString, NSNull
- To override JSON value to encode (or support custom objects), implement (id)JSON; See YAJLCoding in YAJLGen.h
- @throws YAJLGenInvalidObjectException If object is invalid
- @param 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)
-
- @param indentString
- @result JSON String
- */
-- (NSString *)yajl_JSONStringWithOptions:(YAJLGenOptions)options indentString:(NSString *)indentString;
-
-
-#pragma mark Parsing
-
-/*!
- Parse JSON (NSString or NSData or dataUsingEncoding:).
- @result JSON object
- @throws YAJLParserException If a parse error occured
- @throws YAJLParsingUnsupportedException If not NSData or doesn't respond to dataUsingEncoding:
-
- @code
- NSString *JSONString = @"{'foo':['bar', true]}";
- id JSONValue = [JSONString yajl_JSON];
-
- NSData *JSONData = ...;
- id JSONValue = [JSONData yajl_JSON];
- @endcode
- */
-- (id)yajl_JSON;
-
-/*!
- Parse JSON (NSString or NSData or dataUsingEncoding:) with out error.
-
- If an error occurs, the returned object will be the current state of the object when
- the error occurred.
-
- @param error Error to set if we failed to parse
- @result JSON object
- @throws YAJLParserException If a parse error occured
- @throws YAJLParsingUnsupportedException If not NSData or doesn't respond to dataUsingEncoding:
-
- @code
- NSString *JSONString = @"{'foo':['bar', true]}";
- NSError *error = nil;
- [JSONString yajl_JSON:error];
- if (error) ...;
- @endcode
- */
-- (id)yajl_JSON:(NSError **)error;
-
-/*!
- Parse JSON (NSString or NSData or dataUsingEncoding:) with options and out error.
-
- If an error occurs, the returned object will be the current state of the object when
- the error occurred.
-
- @param options Parse options
- - YAJLParserOptionsNone: No options
- - YAJLParserOptionsAllowComments: Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //)
- - YAJLParserOptionsCheckUTF8: Invalid UTF8 strings will cause a parse error
- - YAJLParserOptionsStrictPrecision: If YES will force strict precision and return integer overflow error
-
- @param error Error to set if we failed to parse
- @result JSON object
- @throws YAJLParserException If a parse error occured
- @throws YAJLParsingUnsupportedException If not NSData or doesn't respond to dataUsingEncoding:
-
- @code
- NSString *JSONString = @"{'foo':['bar', true]} // comment";
- NSError *error = nil;
- [JSONString yajl_JSONWithOptions:YAJLParserOptionsAllowComments error:error];
- if (error) ...;
- @endcode
- */
-- (id)yajl_JSONWithOptions:(YAJLParserOptions)options error:(NSError **)error;
-
-@end
-