diff --git a/src/OpenFeature.Providers.Ofrep/Extensions/MetadataExtensions.cs b/src/OpenFeature.Providers.Ofrep/Extensions/MetadataExtensions.cs
new file mode 100644
index 00000000..01a01bf0
--- /dev/null
+++ b/src/OpenFeature.Providers.Ofrep/Extensions/MetadataExtensions.cs
@@ -0,0 +1,78 @@
+using System.Text.Json;
+
+namespace OpenFeature.Providers.Ofrep.Extensions;
+
+///
+/// Extension methods for handling metadata conversion.
+///
+internal static class MetadataExtensions
+{
+ ///
+ /// Converts a dictionary with JsonElement values to a dictionary with primitive types.
+ ///
+ /// The metadata dictionary with potential JsonElement values.
+ /// A new dictionary with primitive type values (string, double, bool).
+ internal static Dictionary ToPrimitiveTypes(this Dictionary metadata)
+ {
+ return metadata.ToDictionary(
+ kvp => kvp.Key,
+ kvp => ExtractPrimitiveValue(kvp.Value)
+ );
+ }
+
+ ///
+ /// Extracts a primitive value from an object that may be a JsonElement.
+ ///
+ /// The value to extract.
+ /// The extracted primitive value.
+ private static object ExtractPrimitiveValue(object value)
+ {
+ if (value is JsonElement jsonElement)
+ {
+ return jsonElement.ValueKind switch
+ {
+ JsonValueKind.String => jsonElement.GetString() ?? string.Empty,
+ JsonValueKind.Number => jsonElement.GetDouble(),
+ JsonValueKind.True => true,
+ JsonValueKind.False => false,
+ JsonValueKind.Object => ConvertJsonObject(jsonElement),
+ JsonValueKind.Array => ConvertJsonArray(jsonElement),
+ JsonValueKind.Null => string.Empty,
+ _ => jsonElement.GetRawText()
+ };
+ }
+
+ // If it's already a primitive type, return as-is
+ return value;
+ }
+
+ ///
+ /// Converts a JsonElement object to a Dictionary with primitive values.
+ ///
+ /// The JSON element containing the object.
+ /// A dictionary with string keys and primitive values.
+ private static Dictionary ConvertJsonObject(JsonElement jsonElement)
+ {
+ var result = new Dictionary();
+ foreach (var property in jsonElement.EnumerateObject())
+ {
+ result[property.Name] = ExtractPrimitiveValue(property.Value);
+ }
+ return result;
+ }
+
+ ///
+ /// Converts a JsonElement array to a List with primitive values.
+ ///
+ /// The JSON element containing the array.
+ /// A list with primitive values.
+ private static List