HouzuoGuo/tiedot — pull request #53 by fiatmoney (2014-03-08 17:34:39+00:00)
Title: Add query parameterization

I elected to just surface the ParameterizeJSON function, so the resulting JSON can still be manipulated, stored as a string, etc. It would be pretty simple to wrap it into a full EvalParameterizedQuery function if you want to hide the underlying interpolation to promote an "always parameterize" best practice like many SQL libraries.

The JSON escaping is based on the RFC, and the identification of naked ```?``` characters outside of any string (the interpolation points) is based on a simple quote-counting algorithm.

This addresses [Issue 52](https://github.com/HouzuoGuo/tiedot/issues/52).