Skip to content

Instantly share code, notes, and snippets.

@SerenadeX
SerenadeX / Serializable.swift
Created December 30, 2015 18:26 — forked from anaimi/Serializable.swift
Serialize a Swift object to JSON or Dictionary, with selective properties.
/*
Purpose:
Convert (or Serialize) an object to a JSON String or Dictionary.
Usage:
Use 'Serialize.toJSON' on instances of classes that:
- Inherit from NSObject
- Implement 'Serializable' protocol
- Implement the property 'jsonProperties' and return an array of strings with names of all the properties to be serialized
NOTE:
* Select is the center clicky bit of the top touch pad.
* You can also click / click-and-hold the edges of the touch pad
* Home button looks like a TV to the right of Menu
REMOTE PAIRING
Unpair Siri Remote: Menu, Volume-Up (+), hold for a second or two
REDO RESOLUTION (AUTO)
Screen Resolutions: Menu, Volume-Down (-), hold for a second or two and then release