Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization #46

Open
Vorlias opened this issue May 13, 2021 · 0 comments
Open

Serialization #46

Vorlias opened this issue May 13, 2021 · 0 comments
Labels
Enhancement New feature or request Planned A planned change RFC request for comments

Comments

@Vorlias
Copy link
Member

Vorlias commented May 13, 2021

Serialization/Deserialization of objects in RbxNet is an important use case I want to eventually cover.

This would probably involve a slight overhaul of the remote objects used by Net to accompany the ability for functions to serialize values.

The idea would be to have a member Serialize(), then a static deserialize() on the object. It's possible Net could implicitly convert this before sending and when receiving by checking for objects.

Implicit option

  • Net.Serialization.AddSerializableClass(MyClass) which:
  • Would check for an object that inherits MyClass - should have member Serialize and static deserialize.
  • When calling a invoking function (e.g. SendToPlayer) it should look through the arguments and serialize any applicable objects.
  • When recieving, it should check for the serialized representation, then deserialize back to the object.

Serialized representation would be something akin to {"ClassName": "MyClass", "Value": SerializedObjectValue}.

This would also probably be something that gets only enabled if there are actually serializable classes added.

Explicit option

Would involve the remote objects themselves. I am currently thinking up the API idea for this.

@Vorlias Vorlias added Enhancement New feature or request Planned A planned change labels May 13, 2021
@Vorlias Vorlias added the RFC request for comments label Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Planned A planned change RFC request for comments
Projects
None yet
Development

No branches or pull requests

1 participant