Non-standard type-casting feature #26

Merged
merged 3 commits into from Oct 29, 2012

Conversation

Projects
None yet
3 participants
Contributor

ixti commented Aug 8, 2012

Allow typecasting of values that can be safely typecasted, e.g. "42" -> 42

puzrin commented Aug 8, 2012

I'd like to clarify, why it's useful. When you parce info in router - result is usually String, even for {\d+} patterns. That will make problem with + operator.

Validator looks good place to force casts - no additional code in user projects. Also, forcing global casts for all ints is safe in most cases. But we left this option false by default, to keep compatibility with JSON Schema specs, and previous revalidator versions.

pksunkara added a commit that referenced this pull request Oct 29, 2012

Merge pull request #26 from nodeca/feature-typecasting
Non-standard type-casting feature

@pksunkara pksunkara merged commit 77804b9 into flatiron:master Oct 29, 2012

@ixti ixti referenced this pull request Oct 29, 2012

Merged

Allow cast booleans #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment