Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUGGESTION] Support for paste JSON/XML as classes #1038

Closed
callumbwhyte opened this issue Mar 29, 2024 · 3 comments
Closed

[SUGGESTION] Support for paste JSON/XML as classes #1038

callumbwhyte opened this issue Mar 29, 2024 · 3 comments
Assignees
Labels
area-roslyn enhancement New feature or request
Milestone

Comments

@callumbwhyte
Copy link

callumbwhyte commented Mar 29, 2024

Following discussion with @arkalyanms and @webreidi at MVP Summit, one feature I feel is missing from C# Dev Kit in VS Code is the "paste JSON/XML as classes" feature from Visual Studio.

This allows you to copy a JSON or XML object, and via the "Paste Special" menu paste it as a C# class with the relevant types created / matched (See here)

It is a hugely helpful feature when creating integrations with APIs: copy sample from docs -> paste into Visual Studio -> C# class representing the object(s) automatically created.

The Visual Studio implementation is certainly not perfect, e.g. I wish it would keep properties pascal case, or automatically apply System.Text.Json serialization attributes where relevant, but it definitely speeds things up!

In VS Code I imagine this could appear in the Edit menu, or as an option on right-click when within a .cs file.

@callumbwhyte callumbwhyte added the enhancement New feature or request label Mar 29, 2024
@AbhitejJohn
Copy link

Tagging @arkalyanms to put this on his radar for triage.

@arunchndr
Copy link
Member

Starting with @mikadumont to drive design. This might need vscode side work.

@dibarbet
Copy link
Member

dibarbet commented Oct 8, 2024

Moving over to track on the C# extension side as that is where the paste handling would likely occur - dotnet/vscode-csharp#7644

@dibarbet dibarbet closed this as not planned Won't fix, can't repro, duplicate, stale Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-roslyn enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants