json is empty after a hard reboot

oriagranat9 :

im using Jackson object mapper to save a json file into a raspberry pi file file is ok and is filled with data until i unplug the power to it. after plugging it back and checking the file it is empty.

    public static <T> void serialize(Path path, T object, Class<T> ref, StdSerializer<T> serializer) throws IOException {
    ObjectMapper objectMapper = new ObjectMapper();
    SimpleModule module = new SimpleModule();
    module.addSerializer(ref, serializer);
    objectMapper.registerModule(module);

    objectMapper.writerWithDefaultPrettyPrinter().writeValue(new File(path.toString()), object);
}
oriagranat9 :

As noted to me above the problem was the fat filesystem when moving the save location into the home directory the problem didn't occur

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=417769&siteId=1