Hi, You cannot fill the text field with JSON. You need to encode/ decode the object (your JSON) based on your need. You can use like
Code:
Ext.onReady(function(){
var myJSon, panel;
myJSon = ['{"menu": { "id": "file", "value": "File", "popup": { "menuitem": [ {"value": "New", "onclick": "CreateNewDoc()"}, {"value": "Open", "onclick": "OpenDoc()"}, {"value": "Close", "onclick": "CloseDoc()"} ] } }}'];
panel = Ext.create('Ext.panel.Panel', {
renderTo: Ext.getBody(),
title: 'JSON',
width: 600,
bodyPadding: 10,
layout: 'anchor',
items: [{
xtype: 'textfield',
value: Ext.encode(myJSon)
}]
});
});