simplejson -> json

This commit is contained in:
meejah
2017-01-19 15:39:53 -07:00
parent bb782b0331
commit 031a88c25f
48 changed files with 219 additions and 225 deletions

View File

@ -4,7 +4,7 @@ import time, unicodedata
from zope.interface import implements
from twisted.internet import defer
from foolscap.api import fireEventually
import simplejson
import json
from allmydata.deep_stats import DeepStats
from allmydata.mutable.common import NotWriteableError
@ -252,7 +252,7 @@ def _pack_normalized_children(children, writekey, deep_immutable=False):
entry = "".join([netstring(name.encode("utf-8")),
netstring(strip_prefix_for_ro(ro_uri, deep_immutable)),
writecap,
netstring(simplejson.dumps(metadata))])
netstring(json.dumps(metadata))])
entries.append(netstring(entry))
return "".join(entries)
@ -361,7 +361,7 @@ class DirectoryNode:
try:
child = self._create_and_validate_node(rw_uri, ro_uri, name)
if mutable or child.is_allowed_in_immutable_directory():
metadata = simplejson.loads(metadata_s)
metadata = json.loads(metadata_s)
assert isinstance(metadata, dict)
children[name] = (child, metadata)
children.set_with_aux(name, (child, metadata), auxilliary=entry)