Welcome Guest, Not a member yet? Register   Sign In
any luck w/ json encode decode?
#1

[eluser]CI jforth[/eluser]
Ok maybe I can get some insight here on this issue.

If i take a json feed from a site that I know works like http://jaiku.com/feed/json
I can parse it fine with jquery no problems but if i take that same feed and pass it through json_decode and then json_encode Shouldn't encode return the same data as the original? I keep getting an error in firefox invalid label with the encoded feed.
#2

[eluser]Nick Husher[/eluser]
What's the JSON in question? I mean, what's the input and what's the output?
#3

[eluser]CI jforth[/eluser]
I'm just testing something here.

if I take this json feed http://jaiku.com/feed/json

and do this
Code:
$h = fopen('http://jaiku.com/feed/json');
$f = stream_get_contents($h);
fclose($h);

$decode = json_decode($f);
$encode = json_encode($decode);

echo $encode;

I'm unable to parse the what should be the same code.




Theme © iAndrew 2016 - Forum software by © MyBB