I've been attempting to read in a JSON
dictionary from Swift through PHP and display the results.
So far, I have been able to send the dictionary in the form {location: "North America", Name: "Me"}
to the server correctly using a POST
method.
My problem is reading in the content and displaying it.
My PHP code is:
<?php
$json = file_get_contents('php://input');
$value = json_decode($json);
var_dump($value);
?>
Whenever I run the script, I get a 500
server error. Any help would be appreciated.