A lightweight and developer-friendly Swift utility for encoding, decoding, and converting JSON with powerful debug support.
- Convert
DictionaryorNSDictionaryto JSON string. - Convert JSON string to
DictionaryorNSDictionary. - Encode any
Encodableobject to JSON string or data. - Decode any JSON string or data to a
Decodableobject. - Objective-C compatible methods for interoperability.
- Debug-friendly logs with emoji for easy inspection.
Add this to your Package.swift dependencies:
.package(url: "https://github.com/Rohijulislam/JSONUtils.git", from: "main")Then add "JSONUtils" to your target's dependencies.
- Supports bridging with Objective-C through:
- jsonStringFromDictionary: – Converts NSDictionary to NSString.
- dictionaryFrom: – Converts NSString to NSDictionary.
- jsonStringFromData: – Converts NSData to NSString.
MIT License. See the LICENSE file for full details.