...

View Full Version : Why does JSON decode this as NULL object?



kimtd
01-23-2008, 01:08 AM
I tried this using php json_decode function() as well as this package (http://mike.teczno.com/JSON/JSON.phps). Both of them produce NULL. Anyone have any idea as to why?

JSON is here -> http://facebook.dreamhosters.com/tmpjson

PHP code:



<?php

include_once("JSON.php");

$handle = @fopen("http://facebook.dreamhosters.com/tmpjson", "r");

if ($handle) {
$json = new Services_JSON();

while (!feof($handle)) {
$buffer = trim(fgets($handle, 500000));
//$object = json_decode($buffer);
$object = $json->decode($buffer);
var_dump($object);
}
fclose($handle);
}
?>

A1ien51
01-23-2008, 01:22 AM
Well it is WAY to long for me to go through that entire thing. It is 53K+ long....rather crazy...

If you run it in firefox where you take it and eval it it says: "invalid label"

Eric



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum