1
mirror of https://github.com/CarmJos/BukkitJSONSerializer.git synced 2026-06-04 16:48:18 +08:00

[skip ci] docs(code)

This commit is contained in:
2022-06-07 18:09:05 +08:00
committed by GitHub
parent b5ad3541b8
commit 3e1399ebf6
+2 -2
View File
@@ -23,7 +23,7 @@ Then, we cloud use `serializeToJSON(ConfigurationSerializable)` to serialize a o
```jave
Location location = new Location(Bukkit.getWorlds().get(0), -100.5, 100, 105.5);
String serialized = BukkitJSONSerializer.serializeToJSON(location);
String serialized = serializer.serializeToJSON(location);
// -> {"world":"world","x":-100.5,"y":100,"z":105.5,"yaw":0.0,"pitch":0.0}
```
@@ -35,7 +35,7 @@ Location location = serializer.deserializeSON(json, Location.class);
// Location{world=world, x=-100.5, y=100, z=105.5, pitch=0.0, yaw=0.0}
```
Or use `BukkitJSONSerializer#deserializeSON(json,typeClass,defaultValue)` if we need a default value.
Or use `deserializeSON(json,typeClass,defaultValue)` if we need a default value.
### JSONSerializable class