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

nestedObjectArray usage? #4

Open
cyrillef opened this issue Sep 10, 2021 · 0 comments
Open

nestedObjectArray usage? #4

cyrillef opened this issue Sep 10, 2021 · 0 comments

Comments

@cyrillef
Copy link

export class myclass extends Serializable {

	@SerializableInfo.position(0)
	@SerializableInfo.length(1)
	@SerializableInfo.numberType(NumberType.UInt8)
	protected _one: number;

	@SerializableInfo.position(1)
	@SerializableInfo.numberType(NumberType.UInt8)
	@SerializableInfo.nestedObjectArray( ??? , 1)
	protected _two: number[];

	@SerializableInfo.position( ??? )
	@SerializableInfo.numberType(NumberType.UInt8)
	@SerializableInfo.nestedObjectArray( ??? , 2)
	protected _three: Map<number, number>;

	@SerializableInfo.position( ??? )
	@SerializableInfo.nestedObjectArray( ??? , ??? )
	protected _four: mysubclass;

I got 3 questions
1- how do I serialize an array number[]
2- how do I serialize an object like a custom one and/or a Map<>
3- how do I serialize the two above when I get a variable length. What do I put in position() or shall I remove it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant