New in .NET 10.0 [21]: Outputting commands and parameters in JSON for SDK tools

The .NET SDK commands now provide help information in JSON format via a new parameter.

listen Print view
.NET signpost

(Image: Pincasso / Shutterstock.com)

1 min. read
By
  • Dr. Holger Schwichtenberg

With the new parameter --cli-schema, developers have been able to get an output of command options and parameters in JavaScript Object Notation (JSON) for .NET SDK command-line commands since .NET 10.0.

Der Dotnet-Doktor – Holger Schwichtenberg
Der Dotnet-Doktor – Holger Schwichtenberg

Dr. Holger Schwichtenberg ist technischer Leiter des Expertennetzwerks www.IT-Visions.de, das mit 53 renommierten Experten zahlreiche mittlere und große Unternehmen durch Beratungen und Schulungen sowie bei der Softwareentwicklung unterstützt. Durch seine Auftritte auf zahlreichen nationalen und internationalen Fachkonferenzen sowie mehr als 90 Fachbücher und mehr als 1500 Fachartikel gehört Holger Schwichtenberg zu den bekanntesten Experten für .NET und Webtechniken in Deutschland.

Previously, this information was already available in plain text form via the help function, but required multiple individual commands, such as

dotnet package -h
dotnet package add -h
dotnet package list -h

The screenshot shows a section of the JSON schema output of a .NET SDK CLI command (Fig. 1).

Videos by heise

The screenshot shows a section of the help information of a .NET SDK CLI command (Fig. 2).

(mki)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.