Allow override of JSONEncoder