diff --git a/lib/mixins/property-accessors.html b/lib/mixins/property-accessors.html
index 6555968e7a..8d1c03074e 100644
--- a/lib/mixins/property-accessors.html
+++ b/lib/mixins/property-accessors.html
@@ -307,7 +307,7 @@
outValue = JSON.parse(value);
} catch(x) {
outValue = null;
- console.warn('Polymer::Attributes: couldn`t decode Array as JSON');
+ console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${value}`);
}
break;
diff --git a/test/unit/attributes.html b/test/unit/attributes.html
index 1df5e881be..12f957c545 100644
--- a/test/unit/attributes.html
+++ b/test/unit/attributes.html
@@ -212,6 +212,15 @@
assert.strictEqual(element.dashCase, 'Changed');
});
+ test('value that cannot deserialize from JSON warns', function() {
+ sinon.spy(console, 'warn');
+ var badAttr = '[foo, bar]';
+ element.setAttribute('array', badAttr);
+ assert.isTrue(console.warn.calledOnce);
+ assert.include(console.warn.firstCall.args[0], badAttr);
+ console.warn.restore();
+ });
+
});
suite('imperative attribute change (reflect)', function() {