title: How do you use a JSON string or JSON object with jqGrid?
body: <p>My jqGrid is work when my JSON data is in a static file, but if I copy the data to a var and then try to load the var into the jqGrid's url it doesn't show.</p>
  
  <p>Can you pass a string into jqGrid</p>
  
  <p>e.g.
  This works:</p>
  
  <pre><code>function GetJSON() {
      var jsonFile = "EntityWithChildren.json";
      return jsonFile;//returning a file works fine.
  }
  
  $("#jsonmap").jqGrid({
      url: GetJSON(),
      datatype: 'json',
  </code></pre>
  
  <p>this doesn't:</p>
  
  <pre><code>function GetJSON() {
      var json = '{"page":"1","total":"10",   "records":"10", "Entities": [       {"Fields":["Entity1", "field1", "11"]},     {"Fields":["", "field2", "22"]},        {"Fields":["Entity2", "field3", "33"]},     {"Fields":["ChildEntity1", "cfield1", "111"]}   ]}';
      return json; //doesnt work
  
  }
  
  $("#jsonmap").jqGrid({
      url: GetJSON(),
      datatype: 'json',
      //datatype: 'jsonstring',//this doesnt work either
  </code></pre>