private static Dictionary BuildPropertyNameToJsonPropertyNameMap()

in Elastic.SemanticKernel.Connectors.Elasticsearch/Internal/Helpers/VectorStoreRecordPropertyReader.cs [593:616]


    private static Dictionary<string, string> BuildPropertyNameToJsonPropertyNameMap(
        (List<VectorStoreRecordKeyProperty> keyProperties, List<VectorStoreRecordDataProperty> dataProperties, List<VectorStoreRecordVectorProperty> vectorProperties) properties,
        Type dataModel,
        JsonSerializerOptions options)
    {
        var jsonPropertyNameMap = new Dictionary<string, string>();

        foreach (var keyProperty in properties.keyProperties)
        {
            jsonPropertyNameMap.Add(keyProperty.DataModelPropertyName, GetJsonPropertyName(keyProperty, dataModel, options));
        }

        foreach (var dataProperty in properties.dataProperties)
        {
            jsonPropertyNameMap.Add(dataProperty.DataModelPropertyName, GetJsonPropertyName(dataProperty, dataModel, options));
        }

        foreach (var vectorProperty in properties.vectorProperties)
        {
            jsonPropertyNameMap.Add(vectorProperty.DataModelPropertyName, GetJsonPropertyName(vectorProperty, dataModel, options));
        }

        return jsonPropertyNameMap;
    }