Index: entity/entity.controller.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/entity/entity/Attic/entity.controller.inc,v
retrieving revision 1.1.2.31
diff -u -p -r1.1.2.31 entity.controller.inc
--- entity/entity.controller.inc	25 Nov 2010 16:54:28 -0000	1.1.2.31
+++ entity/entity.controller.inc	26 Nov 2010 02:05:54 -0000
@@ -462,7 +462,7 @@ class EntityAPIController extends Drupal
    * Implements EntityAPIControllerInterface.
    *
    * @return
-   *   A serialized string in JSON format suitable for the import() method.
+   *   A PHP string suitable for the import() method.
    */
   public function export($entity, $prefix = '') {
     $vars = get_object_vars($entity);
@@ -470,17 +470,18 @@ class EntityAPIController extends Drupal
     if ($this->nameKey != $this->idKey) {
       unset($vars[$this->idKey]);
     }
-    return entity_var_json_export($vars, $prefix);
+    require_once DRUPAL_ROOT . '/includes/utility.inc';
+    return drupal_var_export($vars, $prefix);
   }
 
   /**
    * Implements EntityAPIControllerInterface.
    *
    * @param $export
-   *   A serialized string in JSON format as produced by the export() method.
+   *   A PHP string as produced by the export() method.
    */
   public function import($export) {
-    $vars = drupal_json_decode($export);
+    $vars = eval($export);
     if (is_array($vars)) {
       return $this->create($vars);
     }
Index: entity/entity.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/entity/entity/Attic/entity.module,v
retrieving revision 1.1.2.29
diff -u -p -r1.1.2.29 entity.module
--- entity/entity.module	25 Nov 2010 16:54:28 -0000	1.1.2.29
+++ entity/entity.module	26 Nov 2010 02:06:17 -0000
@@ -347,46 +352,6 @@ function entity_var_export($var, $prefix
 }
 
 /**
- * Export a variable in pretty formatted JSON.
- */
-function entity_var_json_export($var, $prefix = '') {
-  if (is_array($var) && $var) {
-    // Defines whether we use a JSON array or object.
-    $use_array = ($var == array_values($var));
-    $output = $use_array ? "[" : "{";
-
-    foreach ($var as $key => $value) {
-      if ($use_array) {
-        $values[] = entity_var_json_export($value, '  ');
-      }
-      else {
-        $values[] = entity_var_json_export((string) $key, '  ') . ' : ' . entity_var_json_export($value, '  ');
-      }
-    }
-    // Use several lines for long content. However for objects with a single
-    // entry keep the key in the first line.
-    if (strlen($content = implode(", ", $values)) > 70 && ($use_array || count($values) > 1)) {
-      $output .= "\n  " .  implode(",\n  ", $values) . "\n";
-    }
-    elseif (strpos($content, "\n") !== FALSE) {
-      $output .= " " .  $content . "\n";
-    }
-    else {
-      $output .= " " .  $content . " ";
-    }
-    $output .= $use_array ? "]" : "}";
-  }
-  else {
-    $output = drupal_json_encode($var);
-  }
-
-  if ($prefix) {
-    $output = str_replace("\n", "\n$prefix", $output);
-  }
-  return $output;
-}
-
-/**
  * Implements hook_modules_enabled().
  *
  * Invokes hook_entity_enabled() for new default entities.
