All checks were successful
Run the JSON parser tests / test (push) Has been skipped
17 lines
431 B
C#
17 lines
431 B
C#
using Humanizer;
|
|
|
|
namespace Jtr.Tools;
|
|
|
|
public static partial class Json2CSharpTranslator
|
|
{
|
|
public readonly struct PropertyTranslation : ITranslation
|
|
{
|
|
public string Name { get; init; }
|
|
public string Type { get; init; }
|
|
|
|
public void Translate(Context context)
|
|
{
|
|
context.Builder.Append($"\tpublic {Type} {Name.Pascalize()} {{ get; set; }}\n");
|
|
}
|
|
}
|
|
} |