Handle JSON encoding of void types.