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

Add Custom Object Serialization into docs #48

Open
p-rial opened this issue Oct 21, 2022 · 0 comments
Open

Add Custom Object Serialization into docs #48

p-rial opened this issue Oct 21, 2022 · 0 comments

Comments

@p-rial
Copy link

p-rial commented Oct 21, 2022

Please add how to do custom object serialization in order to be set as value in DictDB.

Example:

import score.DictDB;

public class Example {

  class Custom {
      ...
  }

  private final DictDB<String, CustomObject> temp;
  
  ...
}

Some resources and example I got from the discord channel

https://github.com/balancednetwork/balanced-java-contracts/blob/release/bBaln-core/token-contracts/bBaln/src/main/java/network/balanced/score/tokens/db/LockedBalance.java

https://docs.google.com/presentation/d/1S24vCTcPJ5GOGfPu1sApJLwyOTTdgYEf/export/pdf

https://www.javadoc.io/doc/foundation.icon/javaee-api/latest/score/ObjectReader.html
https://www.javadoc.io/doc/foundation.icon/javaee-api/latest/score/ObjectWriter.html

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