Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a protocol so we can serialize a data type into an Object #14

Closed
brianmullen opened this issue Feb 25, 2016 · 4 comments
Closed

Add a protocol so we can serialize a data type into an Object #14

brianmullen opened this issue Feb 25, 2016 · 4 comments

Comments

@brianmullen
Copy link
Member

We should add a protocol to serialize data types into an Object.

Something like:

public protocol ObjectRepresentable
{
     var objectValue: Object { get }
}
@jarsen
Copy link
Member

jarsen commented Feb 25, 2016

Agreed. I've been trying to think of good names for this protocol for a while. I actually find ObjectConvertible a little confusing—it's not immediately clear to me if it converts into an Object, or can be converted from an Object. Same with ObjectRepresentable I wonder if we want to move towards something more along the lines of Codable and Decodable? Or Marshalable and Demarshalable. Although I'm not sure those are immediately clear either. Or real words.

@bwhiteley
Copy link
Contributor

I found a number of other projects using Marshallable and Unmarshallable.
I like it.

@brianmullen
Copy link
Member Author

I am fine with either one. However, if we use Codable and Decodable, I think more people would know what it is since that follows similar naming with what apple uses.

@jarsen
Copy link
Member

jarsen commented Feb 25, 2016

I'm fine with either as well. Marshallable does fit better with the lib name though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants