Final fix for Dictionnary serialization

This commit is contained in:
Eric NGUYEN 2022-10-12 16:50:20 +02:00
parent 147c02bdfd
commit 846f41829b
7 changed files with 55 additions and 14 deletions

View file

@ -64,14 +64,26 @@ function GetCircularReplacerKeepDataStructure()
}
if (key === 'containers') {
return Object.fromEntries(value);
return [...value.entries()].map((keyPair) => {
return {
Key: keyPair[0],
Value: keyPair[1]
};
});
}
if (key === 'symbols') {
return Object.fromEntries(value);
return [...value.entries()].map((keyPair) => {
return {
Key: keyPair[0],
Value: keyPair[1]
};
});
}
return value;
if (key === 'linkedContainers') {
return Array.from(value);
}
};
}

View file

@ -34,14 +34,26 @@ function GetCircularReplacerKeepDataStructure()
}
if (key === 'containers') {
return Object.fromEntries(value);
return [...value.entries()].map((keyPair) => {
return {
Key: keyPair[0],
Value: keyPair[1]
};
});
}
if (key === 'symbols') {
return Object.fromEntries(value);
return [...value.entries()].map((keyPair) => {
return {
Key: keyPair[0],
Value: keyPair[1]
};
});
}
return value;
if (key === 'linkedContainers') {
return Array.from(value);
}
};
}