moo.core.moojson.replace_object_refs

moo.core.moojson.replace_object_refs(j, old_pk, new_obj)

Return a new JSON string with all {"o#<old_pk>": ...} references replaced by a reference to new_obj. Used at recycle time to substitute $nothing for every property that still points at the object being deleted.