Changeset 57417 for modules/sapphire/branches/roa/api/JSONDataFormatter.php
- Timestamp:
- 04/07/08 16:38:19 (5 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
modules/sapphire/branches/roa/api/JSONDataFormatter.php
r55564 r57417 91 91 if($item->canView()) $jsonParts[] = $this->convertDataObject($item); 92 92 } 93 return "[\n" . implode(",\n", $jsonParts) . "\n]"; 93 $json = "{\n"; 94 $json .= 'totalSize: '; 95 $json .= (is_numeric($this->totalSize)) ? $this->totalSize : 'null'; 96 $json .= ",\n"; 97 $json .= "items: [\n" . implode(",\n", $jsonParts) . "\n]\n"; 98 $json .= "}\n"; 99 100 return $json; 94 101 } 95 102
