Hi together,
I want to create a question via a web application.
Therefore I wrote a php script with a JSON and send it to the server with the curl function.
For each string in the JSON the failure HTTP 400 - Syntax Error, malformed JSON. Integers work without any problems.
I use this URL as my Mount Point to post the question: /rest/questions/1.0/question
So in my opinion the JSON is completed.
That is my JSON:
//JSON topics array
$jsonTopics = array (
"id"=> 8192017,
"name" => 1234,
"description" => "",
"featured" => false
);
//The JSON data
$jsonData = array(
"title" => "abc",
"body" => "def",
"topics" => $jsonTopics,
"dateAsked" => "2019-06-06",
"spaceKey" => "LMLMLM"
);
Thanks to evrybody for any suggestions!!
Please let me know if you need further information or my whole code.