Reputation:
When I return just a profile like
return $profile->toJson();
The json string looks perfect but when I do
return Response::json(array('success' => 'true', 'profile' => $profile->toJson()));
The profile part of the json string as all these backslashes before the quotes.
Upvotes: 2
Views: 1389
Reputation: 1749
It seems to me that you are converting to JSON two times. Try this:
return Response::json(array('success' => 'true', 'profile' => $profile));
Upvotes: 2