The sqlcmd2jon utility lest you enter Transact-SQL statements. The result is an array in JSON format.