using System.Text.Json.Serialization;
public static void Main()
string json = "{\"d\":{\"__metadata\":{\"id\":\"http://my.dev.int:8000/sap/opu/odata/sap/ZFIORI_SERIAL_NUMBERS_SRV/MATERIALSet('250')\",\"uri\":\"http://my.dev.int:8000/sap/opu/odata/sap/ZFIORI_SERIAL_NUMBERS_SRV/MATERIALSet('250')\",\"type\":\"ZFIORI_SERIAL_NUMBERS_SRV.MATERIAL\"},\"MATNR\":\"250\",\"MAKTX\":\"X:K10/MF250\"}}";
var myjson = System.Text.Json.JsonSerializer.Deserialize<MyJson>(json);
Console.WriteLine(myjson.D.MATNR);
Console.WriteLine(myjson.D.MetaB.ID);
public MetaData D {get; set;}
[JsonPropertyName("__metadata")]
public MetaBase MetaB {get; set;}
public string MATNR { get; set; }
public string MAKTX { get; set; }
public string ID {get; set;}
[JsonPropertyName("uri")]
public string Uri {get; set;}
[JsonPropertyName("type")]
public string Type {get; set;}