4.0.5 (November 15, 2016)
Fixes an embarrassing bug in the unwrapRootArrayParser that made the parser ignore any output after an array entry at depth 1. (I.e. a direct child of the root array.)
This fix exists in the v4.0.5 tag, and the v4.0.x branch, but not on master as that has moved on too much.
4.0.4: No Crashes On Invalid UTF-8 Found
(November 3rd, 2016)
Oh, er, well, this is a bit embarrassing. It turns out my tests were
insufficently devious, and did not guard against invalid UTF-8 encodings. I
thought I could punt on UTF-8 validation and rely on
[NSString initWithBytes:length:encoding] to do it, but then Nicolas Seriot reported
otherwise (issue #219). The upshoot of this is that this version
won't crash on a whole range invalid UTF-8 byte sequences where previous
versions crashed did:
- Flat-out illegal UTF-8 byte values
- Missing continuation bytes
- Unexpected continuation bytes
- Overlong encodings
- Invalid Unicode code points
After 9 years of calling SBJson a strict JSON parser I've finally implemented UTF-8 validation. Thank you for the learning opportunity Nicolas!
Also in this release:
- Recreate the project file and targets using Xcode 8.
- Re-organising the frankly bonkers repo layout to hopefully make it easier for casual contributors to find their way around.
- Fix the Travis build; this had broken due to bit rot.
4.0.3 (July 7th, 2016)
207dfa3Adjust Travis CI configuration (#1)
191b0adRename Carthage Mac target
ed536b5Add Carthage iOS target
d53dfe4Add repo status to README
4ca1d84Replace deprecated method with alternative
d088bd1Add codecov badge to README
4e7df93Make variable private
2983d71Attempt at adding code test coverage metrics
959f5bdMake link (hopefully) to LICENCE
52ab522Add a top-level heading to README
abe079dUpdate to-date on license
bff9599Remove prefix headers
2fbe784Use Xcodebuild rather than xctool
5f63aa0Add Gitter URL to README
4.0.2 (June 24th, 2015)
A few patches to address warnings submitted by various people.
a34295fMerge pull request #201 from isimpson/patch-1
6069c12Fix semantic issue Xcode warning
ceaa84aUpdate travis-ci to use a build matrix rather than explicit script
647ff7eAdd semicolons after block - fixes #198
f4933c9Merge pull request #194 from karelia/master
beed41aReturn NULL for invalid chars
e628af0Slightly saner error handling (thanks AppCode!)
852f607Inline method (thanks AppCode!)
20a2eceAdd cast to correct unmatched type issue (thanks AppCode!)
18cbb6cFix typos in comments and variable names (thanks AppCode!)
a90dddfKilled 58 lines of unreachable code (thanks AppCode!)
024672cSimplify expression as suggested by AppCode
f999088Remove broken example (twitter no longer support basic auth)
dba2719Create a new (external) DisplayPretty project and link to it rather than embed it
f7ee521fixup! Extract LICENSE from README again (I changed my mind...)
59d3810Extract LICENSE from README again (I changed my mind...)
4.0.1 (April 17th, 2014)
Change installation instructions to recommend use of CocoaPods.
Started using http://travis-ci.org to ensure builds are good. This now runs tests for both iOS and OSX build of the library.
Fix method names in API documentation examples.
Modernise and tidy up a bit by:
- Convert tests to use XCTest rather than OCUnit.
- Remove unnecessary schemes.
- Turn on analyze for tests too.
- Enable modules & drop explicit dependency on Foundation.
- Make precompiled headers use Foundation/Foundation.h rather than UIKit / Cocoa headers.
- Upgrade to latest Xcode5.1 recommended settings.
- Remove annoying (but harmless) warning about ARC retain cycle in tests.
Full list of commits:
6e28701Run tests for both iOS and OSX
b93a64bTurn on analyze for tests too
816cca4Convert OCUnit to XCTest
0546997Remove unnecessary schemes
91be3a7Upgrade to latest Xcode settings
1b60dd1Make Podfile documentation a bit clearer
79c814bUpdate copyright year
0a60393Remove annoying (but harmless) warning about ARC retain cycle in tests
259fa96Build-status information from Travis
8651019Add shared Xcode schemes for Travis
f0f1d61Add .travis.yml to integrate with travis-ci.org
fb05d7dClarify example in documentation
4.0.0 (December 16th, 2013)
No changes since RC1.
4.0.0-rc1 (December 4th, 2013)
Notable changes since alpha3:
b7bf069Add newline at end of file. Fixes #188.
4.0.0-alpha3 (November 17th, 2013)
Notable changes since 4.0.0-alpha2:
f7ef205Add documentation for more convenience constructors
49bcff0Rename classes, constants & enums to add major version number (4)
fda671cRemove old SBJsonParser and rename SBJsonChunkParser to SBJsonParser
c053bebChanged secondary init method to be a class method instead
faaa654Remove parser as argument to all its delegate methods
e8a1444Move max-depth error handling from stream parser to chunk-parser
4ef698eMake SBJsonChunkParser "immutable" by removing properties
d6342f6Use the ChunkParser in the DisplayPretty example
4.0.0-alpha2 (November 13th, 2013)
Notable changes since 4.0.0-alpha:
d13a5a8Support stopping parsing after a certain number of partial documents
cbdd83cReplace SBJsonStreamParserAdapter with SBJsonChunkParser
a52fefaUpdate DisplayPretty example to use ARC
9bedeecTurn on most sensible warnings
641f506Move properties to be nonatomic, and remove explicit @synthesize declarations
b41acb1Use weak rather than unsafe_unretained (no longer support iOS < 5)
c3f7db0Make the "skip outer array" option of the stream parser easier to understand.
f342770Move multi-document support chosing to the parser delegate, so decision can be done in the adapter
28a7c73Update documentation to remove reference to -autorelease method
ab11d2bRemove the silly parser/writer Accumulators
b02a095Avoid warning for Mac OS X build
4.0.0-alpha (November 9th, 2013)
I'm delighted to announce SBJson 4.0.0-ALPHA. Notable changes since 3.2.0:
- #160 & #162 - Remove category &
- #171 - Support full range of
unsigned long longas 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.
3.2.0 (January 19th, 2013)
Version 3.2.0 was released, with no changes since rc1.
3.2.0-rc1 (January 4th, 2013)
- Deprecated the
- Deprecated several methods that return an error through an
These will be removed in the next major version release.
- 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.
- 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)
3.1.1 (August 4th, 2012)
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 (March 26th, 2012)
Automatic Reference Counting
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.
3.0 (June 18th, 2011)
JSON Stream Support
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.
Parse and write UTF8-encoded NSData
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.
Project renamed to SBJson
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
- If you link to the library rather than copy the classes you have to
change the library you link to. On the Mac
SBJson.framework. On iOS
libsbjson-ios.a. In both cases you now have to
#import <SBJson/SBJson.h>in your code.
API documentation integrated with Xcode
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.