Can’t add classes using jQuery from a JSON string with get_body_class()

get_body_class() is going to return an array of classes, which is then (per code not published in your question) JSON encoded into that comma separated string. While you can manipulate that in JavaScript, the easiest thing to do is implode the string before encoding:

$c = get_body_class('project');
$c = implode($c,' ');

You should have a nice neat space separated string that you don’t have to manipulate further.