Ste Yeu
Ste Yeu

Reputation: 157

JSON code not valid

I have this error in validate test of jsonlint.com:

Results

Parse error on line 1:
s: 39551: "a:35:{s:4
^
Expecting '{', '['

Can someboady help me to fix it?

Thank a lot in advance!

Upvotes: 2

Views: 65

Answers (2)

Waldz
Waldz

Reputation: 104

You should provide code example. But it seems what is not JSON, but serialized PHP. In that case You should use:

unserialize("a:35:{s:4  ...");

Instead of:

json_decode("a:35:{s:4  ...");

Upvotes: 1

Darshak Parmar
Darshak Parmar

Reputation: 41

put those brackets on line one.

Upvotes: 2

Related Questions