Hi,
I ran into a problem with STON that seems to corrupt on materialization.
Consider the following script:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c := OrderedCollection with: UUID new.
d := Dictionary with: c first -> nil.
o := { c . d }.
s := STON toStringPretty: o.
o2 := STON reader
allowComplexMapKeys: true;
on: s readStream;
next.
o2 second keys. "an Array(an UUID('571bbfb7-78b9-430c-9aad-3e0088a25f4c'))"
o2 second printString. "KeyNotFound: key an
UUID(''571bbfb7-78b9-430c-9aad-3e0088a25f4c'') not found in Dictionary"
o2 second at: o2 second keys first. "the same error"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So even though it contains the key it fails to access it.
Interestingly enough if I serialize and materialize the "broken" dictionary
again it suddenly works again.
Thanks,
Peter