php - special char in JSON -
I should send Hand-crafting JSON instead of use: If you have to manually add your JSON, make sure to add a backslash before the quotation marks: hi " to a Yahoo server, so in PHP, to be
", but it will get a bad JSON argument. How do i do it
$ message = "hi \" ";
in the JSON code without any errors; $ Postdata = '{"Message": "'. $ Message. '"' ';
$ Postdata = json_encode (array ("message" => message $););
$ message = "hi \\\" "; // Or, more clearly ... $ message = 'Hi \\' ';
Comments
Post a Comment