Group conact with json formact in Doctrine

  doctrine, group-concat, json, symfony

I am using group concat extention in in Doctrine and it is returning the result set as comma separated values,
But I need to get the values as json format like, {uuid:"4a6fc592-83dc-4f9e-ba4d-b9f3b3fad92d",quantity:"50"}, the query I am using as a subquery in querybuilder, I know it is possible in MySql, but is it possible with doctrine querybuilder.

class GroupConcat extends FunctionNode
    public $isDistinct = false;
    public $expression;

    public function getSql(DoctrineORMQuerySqlWalker $sqlWalker)
        return 'GROUP_CONCAT('.
            ($this->isDistinct ? 'DISTINCT ' : '').

    public function parse(DoctrineORMQueryParser $parser)

        $lexer = $parser->getLexer();
        if ($lexer->isNextToken(Lexer::T_DISTINCT)) {

            $this->isDistinct = true;

        $this->expression = $parser->SingleValuedPathExpression();


Source: Symfony Questions