6 * currenly only extracts $this->fields from the list..
12 var $fields = array();
14 function __construct($file)
17 $this->json = json_decode(file_get_contents($file));
18 $this->iterateFields($this->json->items);
19 $this->iterateColumns($this->json->items);
22 function iterateFields($ar)
28 if (!isset($o->{'String hiddenName'})) {
31 $this->fields[] = $o->{'String hiddenName'};
33 $k = isset($o->{'String name'}) ? 'String name' : 'string name';
35 if (!isset($o->{$k})) {
36 break; // allowed to not exit.
38 $this->fields[] = $o->{$k};
48 $k = isset($o->{'String name'}) ? 'String name' : 'string name';
50 if (!isset($o->{$k})) {
51 echo "missing string name";
54 $this->fields[] = $o->{$k};
58 $k = isset($o->{'String currencyName'}) ? 'String currencyName' : 'string currencyName';
60 $this->fields[] = $o->{$k};
61 $k = isset($o->{'String name'}) ? 'String name' : 'string name';
62 $this->fields[] = $o->{$k};
65 if (isset($o->items)) {
66 $this->iterateFields($o->items);
73 function iterateColumns($ar)
81 if (isset($o->items)) {
82 $this->iterateColumns($o->items);