Serialize/Deserialize objects which don't extend Parse.Object?

When you create a custom class (not related to Parse.Object) which has a function named toJSON() for serializing it, it becomes automatically serialized prior to being stored on the server as a custom field. But then retrieving it you need to deserialize it by yourself (for example by calling its constructor or maybe a static method fromJSON().

I wonder if there’s a way to register custom classes so they get unserialized automatically on fetching their parent objects…

Does anyone know?

I think the best way is extending Parse.Object and adding a custom property to deserialize the object. Take a look here.

Yep, that works but it will leave the database full of untracked objects. Is there a way to apply that same deserializing process without saving new classes? If not, would that be an interesting feature to add?

I am not sure I got your concerns. Could you give an example of how it works now and how you think it should work?