Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

[CORE-1117] Wrap converted plist values in JSON object #3

Merged
merged 1 commit into from
Mar 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Analytics/Classes/Internal/SEGFileStorage.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down