No changes since RC1.
Notable changes since alpha3:
b7bf069
Add newline at end of file. Fixes #188.
Notable changes since 4.0.0-alpha2:
f7ef205
Add documentation for more convenience constructors49bcff0
Rename classes, constants & enums to add major version number (4)fda671c
Remove old SBJsonParser and rename SBJsonChunkParser to SBJsonParserc053beb
Changed secondary init method to be a class method insteadfaaa654
Remove parser as argument to all its delegate methodse8a1444
Move max-depth error handling from stream parser to chunk-parser4ef698e
Make SBJsonChunkParser "immutable" by removing propertiesd6342f6
Use the ChunkParser in the DisplayPretty example
Notable changes since 4.0.0-alpha:
d13a5a8
Support stopping parsing after a certain number of partial documentscbdd83c
Replace SBJsonStreamParserAdapter with SBJsonChunkParsera52fefa
Update DisplayPretty example to use ARC9bedeec
Turn on most sensible warnings641f506
Move properties to be nonatomic, and remove explicit @synthesize declarationsb41acb1
Use weak rather than unsafe_unretained (no longer support iOS < 5)c3f7db0
Make the "skip outer array" option of the stream parser easier to understand.f342770
Move multi-document support chosing to the parser delegate, so decision can be done in the adapter28a7c73
Update documentation to remove reference to -autorelease methodab11d2b
Remove the silly parser/writer Accumulatorsb02a095
Avoid warning for Mac OS X build
I'm delighted to announce SBJson 4.0.0-ALPHA. Notable changes since 3.2.0:
- #160 & #162 - Remove category &
...error:(NSError**)error
methods. - #171 - Support full range of
unsigned long long
as proper integer type. - #128 - Support full range of
double
. This also removes NSDecimalNumber support. - #180 - Add @rpath support to SBJson.framework build settings.
- #182 - Add option to process values as they’re parsed.
The main reason for a major version change is the removal of the some methods, to allow focus on streaming as explained in this blog post. The change to support the full range of double
was also significant enough that it might have warranted a major version release on its own.
Several community members have contributed to this release.
Version 3.2.0 was released, with no changes since rc1.
Deprecations
- Deprecated the
JSONValue
andJSONRepresentation
category methods. - Deprecated several methods that return an error through an
NSError**
argument.
These will be removed in the next major version release.
Changes
- Absorb LICENSE and INSTALL files into README.
- Remove the Xcode Workspace from the top-level source checkout; the less clutter the better and this doesn't seem to serve any function.
- Change to use AppleDoc for creating API documentation. This results in output looking more consistent with Apple's documentation.
Bugfixes
- Replace use of INFINITY with HUGE_VAL where used as double (reported by Antoine Cœur)
- Correctly parse -0.0 as a JSON number (Cary Yang)
Bugfix release. This release is special in that it mainly contains code by other people. Thanks guys!
- Fix bug that could result in a long long overflow (Ole André Vadla Ravnås)
- Make SINGLETON thread safe (Alen Zhou)
- Updated .gitattributes to say that tests are binary files (Phill Baker)
- Fix string formatter warning in new XCode (Andy Brett)
- Fix issue that could lead to "bad access" or zombie errors (jonkean)
- Update links to API docs
3.1 requires Xcode 4.2 to build, because previous versions did not have ARC support. If you can't use Xcode 4.2, or for some reason can't use ARC, you need to stick with version 3.0.
To make this move simpler I decided to move to 64-bit only & remove instance variables for properties.
- Added an optional comparator that is used when sorting keys.
- Be more memory-efficient when parsing long strings containing escaped characters.
- Add a Workspace that includes the sample projects, for ease of browsing.
- Report error for numbers with exponents outside range of -128 to 127.
We now support parsing of documents split into several NSData chunks, like those returned by NSURLConnection. This means you can start parsing a JSON document before it is fully downloaded. Depending how you configure the delegates you can chose to have the entire document delivered to your process when it's finished parsing, or delivered bit-by-bit as records on a particular level finishes downloading. For more details see SBJsonStreamParser and SBJsonStreamParserAdapter in the API docs.
There is also support for writing to JSON streams. This means you can write huge JSON documents to disk, or an HTTP destination, without having to hold the entire structure in memory. You can use this to generate a stream of tick data for a stock trading simulation, for example. For more information see SBJsonStreamWriter in the API docs.
The internals of SBJsonParser and SBJsonWriter have been rewritten to be NSData based. It is no longer necessary to convert data returned by NSURLConnection into an NSString before feeding it to the parser. The old NSString-oriented API methods still exists, but now converts their inputs to NSData objects and delegates to the new methods.
The project was renamed to avoid clashing with Apple's private JSON.framework. (And to make it easier to Google for.)
- If you copy the classes into your project then all you need to update
is to change the header inclusion from
#import "JSON.h"
to#import "SBJson.h"
. - If you link to the library rather than copy the classes you have to
change the library you link to. On the Mac
JSON.framework
becameSBJson.framework
. On iOSlibjson.a
becamelibsbjson-ios.a
. In both cases you now have to#import <SBJson/SBJson.h>
in your code.
The InstallDocumentation.sh script allows you to generate API documentation from the source and install it into Xcode, so it's always at your fingertips. (This script requires Doxygen to be installed.) After running the script from the top-level directory, open Xcode's documentation window and search for SBJson. (You might have to close and re-open Xcode for the changes to take effect.)
These can be found in the Examples folder in the distribution.
- TweetStream: An exampleshowing how to use the new streaming functionality to interact with Twitter's multi-document streams. This also shows how to link to the iOS static lib rather than having to copy the classes into your project.
- DisplayPretty: A small Mac example project showing how to link to an external JSON framework rather than copying the sources into your project. This is a fully functional (though simplistic) application that takes JSON input from a text field and presents it nicely formatted into another text field.