Using the subclass of JSONEncoder, LazyEncoder, to deal with lazy objects like reverse_lazy