Hello, I am trying to extend STON to allow for substitutions as data is written out or read in. On the write side I got it working as #nextPut: is recursively called, so that is the perfect place to substitute before an object is written. I have tested and my changes work well, where I have an arbitrary object as a subObject and it gets substituted out for my Descriptor object.
I am having difficult on the read side identifying where a substitution lookup should occur after decoding the object on the input stream. I want to inflate the Descritpor object, with its data, and call for a possible substitution. As it is a Descriptor, it should get substituted with the right bits on the read side. I chose to try and do this in the method #setReference:to: and put the substitute into the objects list. This did not work. Where is a good place to look within STON to do a read-side post-substitution? Thank you. - HH