- backend.putJson(String.format(statePreferenceFormat, state.serial), state.json());
- backend.putInt(statePreferenceLatest, state.serial);
+ backend.putJson(String.format(statePreferenceFormat, serial), new AltosJson(state));
+ backend.putInt(statePreferenceLatest, serial);