You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Property files require no additional libraries to parse: it's part of the standard library. This is not an issue currently since Minecraft is providing the json library. But it means there's potential for Minecraft removing the library or changing it.
We can use our own parsing logic. It will mean we can more gracefully handle unexpected types or values. Java has been moving in the direction of types-as-validation: where instead of repeatedly checking that a string is valid, you instead pass the string into a record constructor which throws if it's invalid, so having an instance of that record means by definition that you have a valid string. This pattern is not compatible with the current json library: the exception will just bubble up to fail the entire file.
Same validation steps. It's true that property files are extremely basic, but MapSync's config files are basic. The only potential issue would be the sync addresses since they're stored in an array in json... but they could just be stored as a comma-joined string in the properties file, which means we can then use the same validation logic on the config as on SyncConnectionsGui.
Property files require no additional libraries to parse: it's part of the standard library. This is not an issue currently since Minecraft is providing the json library. But it means there's potential for Minecraft removing the library or changing it.
We can use our own parsing logic. It will mean we can more gracefully handle unexpected types or values. Java has been moving in the direction of types-as-validation: where instead of repeatedly checking that a string is valid, you instead pass the string into a record constructor which throws if it's invalid, so having an instance of that record means by definition that you have a valid string. This pattern is not compatible with the current json library: the exception will just bubble up to fail the entire file.
Same validation steps. It's true that property files are extremely basic, but MapSync's config files are basic. The only potential issue would be the sync addresses since they're stored in an array in json... but they could just be stored as a comma-joined string in the properties file, which means we can then use the same validation logic on the config as on
SyncConnectionsGui.