Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cemolcay/jsontableview
Expandable JSON data viewer
https://github.com/cemolcay/jsontableview
ios json list swift swiftyjson uitableview
Last synced: 3 months ago
JSON representation
Expandable JSON data viewer
- Host: GitHub
- URL: https://github.com/cemolcay/jsontableview
- Owner: cemolcay
- License: mit
- Created: 2019-09-19T09:08:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-26T12:40:19.000Z (over 4 years ago)
- Last Synced: 2024-10-12T19:37:57.707Z (4 months ago)
- Topics: ios, json, list, swift, swiftyjson, uitableview
- Language: Swift
- Size: 1.07 MB
- Stars: 47
- Watchers: 5
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
JSONTableView
===Display your [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON) data on an expandable list view. The view itself is not a `UITableView` subclass, everything is created with `UIStackView`s, so it's not memory friendly for big json files. I created it for debugging my json data in a quick and dirty way. Contributions are welcomed for making it better!
Demo
---![alt tag](https://raw.githubusercontent.com/cemolcay/JSONTableView/master/demo.gif)
Install
---``` ruby
pod 'JSONTableView'
```Usage
---* Create an instance of `JSONTableView` either programmaticaly or in your storyboard.
``` swift
@IBOutlet weak var tableView: JSONTableView?
```* Pass a SwiftyJSON's `JSON` type data object to your JSONTableView instance's `data` property and call `reloadData()`
``` swift
let data = JSON(...)
tableView?.data = data
tableView?.reloadData()
```* You may expand/collapse all possible expandable cells with
``` swift
tableView?.expandAll()
tableView?.collapseAll()
```