A class can implement JSONFriendly to enable JSON serialization of its instances.
JSONFriendly
Todd L Smith
Emit a JSON representation of the receiver onto the specified writer.