check for end-result casting first
Merge pull request #81 from goodybag/81-cast-quote

Casts + JSON derefs are malformed during the automated quoting