QuickJSON is an easy, efficient, and uncompromising integration of the yyjson parsing library.
-
Supports preallocated buffers for higher performance than common options.
-
Single dependency (
yyjson
).-
Optionally utilizes common log infrastructure, useful for debugging.
-
Never imports Foundation - uses primitive Swift types only.
-
-
Only accessible through the
QuickJSON.encode(...)
andQuickJSON.decode(...)
functions.-
Serializes and deserializes data structures based on the Swift-native
Codable
protocol. -
As of version
1.0.0
, QuickJSON also offers encode and decode variants that allow for dynamic type parsing through handler functions.
-
QuickJSON is developed using Semantic Versioning 2.0.0, where given the following pattern MAJOR
.MINOR
.PATCH
, the various elements will be incremented based on the following conditions:
-
MAJOR is incremented when incompatible API changes are made.
-
MINOR is incremented when backwards compatible features are added.
-
PATCH is incremented when backwards bug fixes are shipped.
QuickJSON is built for performance first and foremost. As such, it does NOT include any logging facilities in its build as default. This even applies to debug builds.
To enable logging facilities with QuickJSON, you may define the following swiftSetting
in your Package Description:
.define("QUICKJSON_SHOULDLOG") // this enables logging
-
Linux
-
MacOS
-
iOS and variants...
This package requires a swift-tools-version
>= 5.5
.
-
yyjson
: self-explanatory. -
swift-log
: a core part of the Swift ecosystem. a required build dependency, but only "included" in the final binary when running tests orQUICKJSON_SHOULDLOG
is defined.
QuickJSON and yyjson are both available with an MIT license.