JSON:
{
"Name": "XYZ.Model.DynamicDataModel",
"Version": "1.0",
"References": [
{
"Name": "XConnect",
"Version": "1.0"
},
{
"Name": "Sitecore.XConnect.Collection.Model",
"Version": "9.0"
}
],
"Types": {
"XYZ.Model.DynamicDataFacet": {
"Type": "Facet",
"BaseType": "Sitecore.XConnect.Facet",
"ClrType": "XYZ.Model.DynamicDataFacet, XYZ, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"Properties": {
"Data": {
"Type": [
"XYZ.Model.Data"
]
}
}
},
"XYZ.Model.Data": {
"Type": "Complex",
"ClrType": "XYZ.Model.Data, XYZ, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"Properties": {
"PropertyName": {
"Type": "String"
},
"Type": {
"Type": "String"
},
"Value": {
"Type": "String"
}
}
}
},
"Facets": [
{
"Target": "Contact",
"Name": "DynamicData",
"Type": "XYZ.Model.DynamicDataFacet"
}
]
}
Model
namespace XYZ.Model
{
[Serializable]
[FacetKey(DefaultFacetKey)]
public class DynamicDataFacet : Facet
{
public const string DefaultFacetKey = "DynamicData";
public List<Data> Data { get; set; }
public DynamicDataFacet()
{
Data = new List<Data>();
}
}
}
namespace XYZ.Model
{
[Serializable]
public class Data
{
public string PropertyName { get; set; }
public string Type { get; set; }
public string Value { get; set; }
}
}