Display your SwiftyJSON data on an expandable list view

JSONTableView

Display your SwiftyJSON data on an expandable list view. The view itself is not a UITableView subclass, everything is created with UIStackViews, 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!

Install

pod 'JSONTableView'

Usage

  • Create an instance of JSONTableView either programmaticaly or in your storyboard.
@IBOutlet weak var tableView: JSONTableView?
  • Pass a SwiftyJSON's JSON type data object to your JSONTableView instance's data property and call reloadData()
let data = JSON(...)
tableView?.data = data
tableView?.reloadData()
  • You may expand/collapse all possible expandable cells with
tableView?.expandAll()
tableView?.collapseAll()

GitHub