mirror of
https://github.com/ivanch/tcc.git
synced 2025-10-18 03:37:37 +00:00
modificando json e protobuf
This commit is contained in:
12
ASP.NET/Models/PersonJson.cs
Normal file
12
ASP.NET/Models/PersonJson.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace tcc_app.Models
|
||||
{
|
||||
public class PersonJson
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public int Age { get; set; }
|
||||
public List<string> Friends { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string Phone { get; set; }
|
||||
}
|
||||
|
||||
}
|
24
ASP.NET/Models/PersonProto.cs
Normal file
24
ASP.NET/Models/PersonProto.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using ProtoBuf;
|
||||
|
||||
namespace tcc_app.Models
|
||||
{
|
||||
[ProtoContract()]
|
||||
public class PersonProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[ProtoMember(2)]
|
||||
public int Age { get; set; }
|
||||
|
||||
[ProtoMember(3)]
|
||||
public List<string> Friends { get; set; }
|
||||
|
||||
[ProtoMember(4)]
|
||||
public string Email { get; set; }
|
||||
|
||||
[ProtoMember(5)]
|
||||
public string Phone { get; set; }
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user