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);
21 function iterateFields($ar)
27 $this->fields[] = $o->{'String hiddenName'};
29 $k = isset($o->{'String name'}) ? 'String name' : 'string name';
31 if (!isset($o->{$k})) {
32 break; // allowed to not exit.
34 $this->fields[] = $o->{$k};
44 $k = isset($o->{'String name'}) ? 'String name' : 'string name';
46 if (!isset($o->{$k})) {
47 echo "missing string name";
50 $this->fields[] = $o->{$k};
54 $k = isset($o->{'String currencyName'}) ? 'String currencyName' : 'string currencyName';
56 $this->fields[] = $o->{$k};
57 $k = isset($o->{'String name'}) ? 'String name' : 'string name';
58 $this->fields[] = $o->{$k};
61 if (isset($o->items)) {
62 $this->iterateFields($o->items);