zapier/formatic — pull request #9 by jdeal (2014-08-21 21:20:00+00:00)
Title: Format and parse

@bryanhelmig

Added format and parse methods for types. `format` formats a value for a view. `parse` parses a view value to put it back into the data. Included json type and view for an example. Try `index.html` to see it work (json field at bottom). The json view detects if the value is not parseable and sets the background to red to let you know. It only fires the `change` action if it is valid.

Note in this case, the `format` and `parse` methods aren't really necessary. The view could just as well do the work of translating to and from json. I'm sort of thinking now that might be the norm and `format` and `parse` are overkill.