/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mafia.server.util;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Just1689
 */
public class JacksonUtils<T> {

    public T stringToObject(String json, Class clazz) {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            T result = (T) objectMapper.readValue(json, clazz);
            return result;
        } catch (IOException ex) {
            Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }

    public static String objectToString(Object t) {
        try {
            ObjectMapper objectMapper = new ObjectMapper();
            return objectMapper.writeValueAsString(t);
        } catch (JsonProcessingException ex) {
            Logger.getLogger(JacksonUtils.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }

}

@@ -265,24 +265,86 @@
 gException;%0A
+import com.fasterxml.jackson.databind.DeserializationFeature;%0A
 import com.f
@@ -644,32 +644,122 @@
 ObjectMapper();%0A
+        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);%0A
         try %7B%0A  

Allow fuzzy deserialisation