ExtJS 4无效的JSON字符串

时间:2016-05-05 19:10:36

标签: json extjs extjs4 decode

我在函数内部有这个:

var json = Ext.JSON.decode("{xtype: 'textfield',maxLength: 40}");

很好。 ExtJS允许。
然后我在另一个函数中有这个:

var json = Ext.JSON.decode("{xtype:'combo',store: storeMercadosCombo, displayField: 'mercado',valueField:'id'}");

和ExtJS告诉我:

  

Ext.Error:您正在尝试解码无效的JSON字符串:...

错误在哪里? Ext.JSON.decode应该如何?
我正在使用ExtJS 4.2.1

1 个答案:

答案 0 :(得分:1)

向storeMercadosCombo添加引号。