Skip to content

Instantly share code, notes, and snippets.

@marmoy
marmoy / DictionaryEncoder.swift
Created April 2, 2018 09:48
A DictionaryEncoder to be used with the Encodable protocol, based on the default PropertyListEncoder from the Swift project
//===----------------------------------------------------------------------===//
//
// This source file is a modification of the PropertyListEncoder from the Swift project.
// The modification consists of skipping the final serialization into binary format (in the encode function) and instead returning the dictionary representation of the object to be encoded.
//
//===----------------------------------------------------------------------===//
import Foundation
//===----------------------------------------------------------------------===//