Changing BaseCommand to return JSON string