Well the docs show a normal array prior to being json: From docs.
public function toArray($request)
{
return [
'id' => $this->id,
'name' => $this->name,
'email' => $this->email,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
];
}
And docs say:
Every resource class defines a toArray method which returns the array of attributes that should be converted to JSON when sending the response.
So sending or receiving you have to have well formed array to get well formed Json.
You receive the data through an api route, then do whatever you need to do with it.
Find this line Retrieving JSON Input Values
Here: https://laravel.com/docs/5.7/requests