Xeaker opened a new issue, #1808:
URL: https://github.com/apache/fury/issues/1808
Hi, I want to save every variable in my Data Class. How do I do it? I tried
this from the instruction post.
```
fury = Fury.builder().withLanguage(Language.JAVA)
.requireClassRegistration(true)
.build();
fury.register(Data.class);
fury.register(Hexagon.class);
fury.register(Vector3.class);
fury.register(Units.class);
fury.register(Array.class);
fury.register(FactionList.class);
fury.register(Point.class);
byte[] bytes = fury.serialize(data);
System.out.println(fury.deserialize(bytes));
```
But how do I load them back? With JSON I do this:
```
//Saving
serializedInts = json.toJson(data);
prefs.putString("data", serializedInts);
prefs.flush();
//Loading
serializedInts = prefs.getString("data","No Array stored");
data=json.fromJson(Data.class,serializedInts);
```
Also where is the save file located?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]