Customize serialization with Fuel

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Customize serialization with Fuel

Alejandro Infante
Hello all,

Currently I’m in the need of serializing some Spy instances and my problem is that some of the objects hold references to Classes and CompiledMethods. This gives me headaches because I would like to materialize Spy in another image which possibly does not define those classes and methods.

Is there a smart way to specify which instances variables serialize and which of them not?
Even better would be to specify that instead of serializing an instance variable #a that I know that holds a CompiledMethod, serialize the ring representation of the CompiledMethod.

Thanks,
Alejandro
Reply | Threaded
Open this post in threaded view
|

Re: Customize serialization with Fuel

Mariano Martinez Peck


On Thu, May 7, 2015 at 2:21 PM, Alejandro Infante <[hidden email]> wrote:
Hello all,

Currently I’m in the need of serializing some Spy instances and my problem is that some of the objects hold references to Classes and CompiledMethods. This gives me headaches because I would like to materialize Spy in another image which possibly does not define those classes and methods.

Is there a smart way to specify which instances variables serialize and which of them not?

Yes. 
 
Even better would be to specify that instead of serializing an instance variable #a that I know that holds a CompiledMethod, serialize the ring representation of the CompiledMethod.

That is possible too.  But rather than explaining you, it is easier for you to read the documentation: 


Go to the Documentation area and there are 2 links of interest:


Let me know if that was enough to keep you going.

Reply | Threaded
Open this post in threaded view
|

Re: Customize serialization with Fuel

Alejandro Infante
Cool!

Thanks,
Alejandro

On May 7, 2015, at 2:45 PM, Mariano Martinez Peck <[hidden email]> wrote:



On Thu, May 7, 2015 at 2:21 PM, Alejandro Infante <[hidden email]> wrote:
Hello all,

Currently I’m in the need of serializing some Spy instances and my problem is that some of the objects hold references to Classes and CompiledMethods. This gives me headaches because I would like to materialize Spy in another image which possibly does not define those classes and methods.

Is there a smart way to specify which instances variables serialize and which of them not?

Yes. 
 
Even better would be to specify that instead of serializing an instance variable #a that I know that holds a CompiledMethod, serialize the ring representation of the CompiledMethod.

That is possible too.  But rather than explaining you, it is easier for you to read the documentation: 


Go to the Documentation area and there are 2 links of interest:


Let me know if that was enough to keep you going.