From f2f7d2fb25c777823cf2fa3fd6cc80afe5448ae0 Mon Sep 17 00:00:00 2001 From: Kevin Farst Date: Tue, 24 Mar 2020 14:50:00 -0700 Subject: [PATCH] [CORE-1117] Wrap converted plist values in JSON object --- Analytics/Classes/Internal/SEGFileStorage.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Analytics/Classes/Internal/SEGFileStorage.m b/Analytics/Classes/Internal/SEGFileStorage.m index 16870133f..8e25ebac2 100644 --- a/Analytics/Classes/Internal/SEGFileStorage.m +++ b/Analytics/Classes/Internal/SEGFileStorage.m @@ -142,9 +142,12 @@ - (id _Nullable)jsonForKey:(NSString *)key NSData *data = [self dataForKey:key]; if (data) { BOOL needsConversion = NO; - result = [self jsonFromData:data needsConversion:&needsConversion]; + id json = [self jsonFromData:data needsConversion:&needsConversion]; if (needsConversion) { [self setJSON:result forKey:key]; + result = @{key: result}; + } else { + result = json; } } return result;