test for #492
Fixes support for replacer functions. Closes #529
Corrects JSON test to evaluate all tests.