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

ID in ToCamelCase not correct #70

Open
EagleTsui opened this issue Jan 11, 2023 · 3 comments
Open

ID in ToCamelCase not correct #70

EagleTsui opened this issue Jan 11, 2023 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@EagleTsui
Copy link

ID in ASP.net core will be translated to id when config json in camel case but NTypewriter will be translated iD.

@NeVeSpl NeVeSpl added the bug Something isn't working label Jan 11, 2023
@Tristan10
Copy link

See #35 related to this issue.

I have the following custom function which will guarantee that the casing will always match .NET. Personally I think this should be used as default.

public static string GetJSONCamelCase(string value)
{
    return System.Text.Json.JsonNamingPolicy.CamelCase.ConvertName(value);
}

@NeVeSpl NeVeSpl added the good first issue Good for newcomers label Jan 12, 2023
@xumix
Copy link

xumix commented Apr 8, 2024

It does not look like System.Text.Json is available in source generators at least
изображение

@NeVeSpl
Copy link
Owner

NeVeSpl commented Apr 8, 2024

It is not officially supported, but it should be available. But which version of it is available depends on VS and what is loaded to VS app domain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants