kalpaitch
kalpaitch

Reputation: 5271

alternative to json_decode before PHP 5.2

Is there a simple alternative to using json_decode function in php versions prior to 5.2? I am feeling lazy at this time of night and can't be bothered to update php yet. Cheers.

Upvotes: 2

Views: 8876

Answers (3)

Matchu
Matchu

Reputation: 85832

The comments for json_decode() include a few possible solutions.

Here's one that decodes by itself (though you shouldn't use it since it uses eval()! Oops.), and here's one that uses a PEAR module.

Upvotes: 4

nxt
nxt

Reputation: 1983

You can find six alternatives at json.org

Upvotes: 5

Related Questions