nikolaposa / version

♈ Value Object that represents a SemVer-compliant version number.
MIT License
139 stars 10 forks source link

Implement JsonSerializable interface #5

Closed pauci closed 8 years ago

pauci commented 8 years ago

It would be nice to add support for serialization to json.

nikolaposa commented 8 years ago

Good idea, thanks.

btw Now that you added one more rendering-related method, can you do one more thing within this PR, which is moving those 3 methods - getVersionString(), __toString() and jsonSerialize() at the end of the Version class? Sequence of methods will be more natural and cleaner that way.

pauci commented 8 years ago

I moved related test-methods at the end of test-class as well - hopefully you are ok with that :)

nikolaposa commented 8 years ago

Sure, that is ok, thanks.

Notice that I've set 2.1.0 milestone for this one, because your changes add new functionality, rather than fixing existing.