Page MenuHomeSealhub

Sealious — get rid of the "format" functionality
Open, Above NormalPublic4 Points

Description

Refactor Sealious in a way that fields no longer take a "format" argument to a .decode method. Currently this makes it so the return type of .decode is unpredictable and it causes the users of the code to need a lot of type assertions.

If a field can return its value in multiple formats, it should instead always return the same type — an instance of a class that has methods like .getAsString or .getAsObject or .getAsSafeString, or whatever the field needs.

Apply it to the "text" field — so it no longer stores the text as both safe and original, just has .getSafe and .getOriginal methods. Write a migration that will help convert old databases to the new syntax