Refactor value transformers to work only on JSON