Skip to content

Rohijulislam/JSONUtils

Repository files navigation

JSONUtils

Swift Platforms License

A lightweight and developer-friendly Swift utility for encoding, decoding, and converting JSON with powerful debug support.


✨ Features

  • Convert Dictionary or NSDictionary to JSON string.
  • Convert JSON string to Dictionary or NSDictionary.
  • Encode any Encodable object to JSON string or data.
  • Decode any JSON string or data to a Decodable object.
  • Objective-C compatible methods for interoperability.
  • Debug-friendly logs with emoji for easy inspection.

📦 Installation

Swift Package Manager (SPM)

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.

🧩 Objective-C Support

  • Supports bridging with Objective-C through:
  • jsonStringFromDictionary: – Converts NSDictionary to NSString.
  • dictionaryFrom: – Converts NSString to NSDictionary.
  • jsonStringFromData: – Converts NSData to NSString.

📄 License

MIT License. See the LICENSE file for full details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages