From 49cf985fa6c160e31ae64c566d47a3a15bb32453 Mon Sep 17 00:00:00 2001
From: Patrick W <pwaters@drupal-dev-pwaters.HighWire.ORG>
Date: Mon, 19 Mar 2012 12:28:22 -0700
Subject: [PATCH] Fixed export

---
 features.export.inc |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/features.export.inc b/features.export.inc
index b25ad83..47020e1 100644
--- a/features.export.inc
+++ b/features.export.inc
@@ -471,7 +471,12 @@ function features_var_export($var, $prefix = '', $init = TRUE) {
       $output = "array(\n";
       foreach ($var as $key => $value) {
         // Using normal var_export on the key to ensure correct quoting.
-        $output .= "  " . var_export($key, TRUE) . " => " . features_var_export($value, '  ', FALSE) . ",\n";
+        $value_export = features_var_export($value, '  ', FALSE);
+        // Wrap JSON exported objects with quotes.
+        if (is_object($value) && json_decode($value_export)) {
+          $value_export = "'drupal_json_decode(" . $value_export . ")'";
+        }
+        $output .= "  " . var_export($key, TRUE) . " => " . $value_export . ",\n";
       }
       $output .= ')';
     }
-- 
1.7.6.4

