Move common JSON support functions to a utility mixin