Best way to manage JSON object via GET and POST in php.
Posted
by Kucebe
on Stack Overflow
See other posts from Stack Overflow
or by Kucebe
Published on 2010-04-27T08:30:35Z
Indexed on
2010/04/27
8:33 UTC
Read the original article
Hit count: 200
My site does some short ajax call in JSON format, using jQuery.
At client-side i'd like to send object just passing it in ajax function, without being forced to wrap it in an object literal like this: {'JSON_Obj' : myJSON_Obj }
.
For the same reasons, at server-side i'd like to manage objects without the binding of $_GET['JSON_Obj']
or $_POST['JSON_Obj']
.
For example, using file_get_contents("php://input")
, i can manage POST requests in that way, but in GET format it doesn't work.
Any suggestions?
© Stack Overflow or respective owner