Starting with 2.0.0 we are only distributing Windows binaries through our NuGet package
. This allows us to be more efficient and not maintain an MSI. We also feel it gives users a better experience not having to mess with include paths, libs, and dlls.
Here is a summary of the changes for this release, please note for the first time we made a couple of breaking API changes in our JSON library. We take breaking changes very seriously and believe these are valuable improvements that allow us to continue to expand and improve the API moving forward.
- General bug fixes – including many reported on CodePlex
- Removed MSIs – now only distributing Windows binaries through NuGet
- Added Visual Studio debugger natvis file to NuGet package
- Added support for cmake for non-Windows platforms
- Added initial Beta implementation for WebSockets on Windows store, other platforms will come in future releases
- Added support for OS X
- Added support for iOS
- Added support for request cancellation through cancellation_tokens for Windows platforms, others will be added in the future
- Added 64 bit integer support. There is a new class json::number that can be retrieved with the json::value::as_number() API. It contains methods for testing and getting a number as int32, uint32, int64, and uint64.
- Changed the underlying storage for arrays and added a new class json::array for operations specific to arrays. Can be obtained from the json::value::as_array() API.
- Changed the underlying storage for objects and added a new class json::object for operations specific to objects. Can be obtained from the json::value::as_object() API.
- Breaking Change - Changed how iteration over json arrays and objects is performed. No longer is an iterator of std::pair<json::value, json::value> returned. Instead there is a separate iterator for arrays and objects on the json::array and json::object class respectively. This allows us to make performance improvements and continue to adjust accordingly. The array iterator returns json::values, and the object iterator now returns std::pair<string_t, json::value>.
- 25% to 30% improvement for parsing and traversing the object model
- Breaking Change - Const overload of index operator on json::value – in prior releases the behavior of the const/non-const overloads where different. This is inconsistent and confusing. The operator now can always end up modifying the underlying internal storage so is never const. If you want true const semantics, the json::value::at(…) API can be used.
- Deprecated a couple of inconsistent/confusing or bad performance APIs, all have functional replacements
- json::value::tostring() – this API really performance serialization and is easy to confuse with json::value::asstring(). The replacement is json::value::serialize().
- json::value::get(…) – this API had bad performance since it returned a json::value with value semantics. It also can be confusing to use if you think you are modifying the underlying internal data. Instead use operator or json::value::at(…).
- Performance improvement avoiding std::isalnum’s global lock
- Moved URI functionality from web::http namespace to just under web. For backwards compatibility using statements have been inserted for customers directly using from http_client.h.
- Breaking Change - Removed pipeline staging feature. It was fundamentally broken and didn’t work at all for processing responses.
- Fixed issues with the close semantics of shutting down a listener.
- Deprecated ‘blittable’ versions of stream read/write. This API is dangerous and only works for trivial types on single byte character streams. It also has bad performance. The functionality can easily be accomplished with the other read/write overloads or getn/putn directly on the stream buffer.
VS solution files and samples
- Cleaned up our solution files and build instructions for all the platforms a bit
- Made sure project files exist for both Visual Studio 2012 and 2013, when appropriate