Use JSONViewer to view JSON as expandable and collapsable nodes in your SwiftUI Project
Usage
-
To Convert JSON String to JSON Node
var rootNode: JSONNode = "{"book":[{ "id":"111","language":"C", "edition":"First","author":"Dennis Ritchie" }]}".jsonNode
-
To Show JSON Node in JSONViewer
JSONViewer(rootNode: rootNode)
-
Demo
https://github.com/varkrishna/JSONViewer/assets/13188037/c8d6a8d4-e05c-48e0-b169-f00193569d22
- Integrate Using Swift Package Manager
Search https://github.com/varkrishna/JSONViewer