Copy Dictionary #24
Replies: 2 comments 10 replies
-
|
Hi! It's a great idea. It would be straightforward to implement a shallow-copy i.e. first level, because I would only have to copy the internal I am not sure how this would work for a deep-copy. If the dictionary has nested dictionaries or collections, those would be easy to deep-copy. However, a custom class would be impossible to copy without knowing it's internals. Maybe you can expand your idea. Thanks! |
Beta Was this translation helpful? Give feedback.
-
|
Hi @YamadaHideki , You can now use VBA-FastJSON to copy dictionaries. Example: Dim jsonDict As String: jsonDict = Serialize(mySourceDict)
Set myTargetDict = Parse(jsonDict).ValueIf the structure does not change, you can just store the json string in a constant and init dictionaries from there. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. What do u think about implementing a method that would copy the passed dictionary (possibly nested)?
Beta Was this translation helpful? Give feedback.
All reactions