#!/usr/bin/env python

from ACR.utils import json_compat
from pymongo.json_util import default

name="JSON"
def serialize(acenv):
	if not json_compat:
		return "ERROR: JSON serializer not installed"
	#try:
	return json_compat.dumps(acenv.generations,default=default)
	#except:
	#	raise Exception("simplejson module not installed. Can't output JSON.")

@@ -50,16 +50,22 @@
 _compat%0A
+try:%0A%09
 from pym
@@ -93,16 +93,60 @@
  default
+%0Aexcept:%0A%09from bson.json_util import default
 %0A%0Aname=%22

Support new pyMongo drivers.