/** * debug only, very slow (creates config with each call). Creates new conf so custom serializers are ignored. * * @param o */ public static void prettyPrintJson(Object o) { FSTConfiguration conf = constructJsonConf(true, true, null); System.out.println(conf.asJsonString(o)); } /**
/** * debug only, very slow (creates config with each call). Creates new conf so custom serializers are ignored. * * @param o */ public static void prettyPrintJson(Object o) { FSTConfiguration conf = constructJsonConf(true, true, null); System.out.println(conf.asJsonString(o)); } /**
public static <T> String toJson(FSTConfiguration fst, T object) { if (object == null) { throw new SerializerException("Object is null"); } return fst.asJsonString(object); }
@Override public JsonNode serialize(Serializable object) { String json = CONFIGURATION.asJsonString(object); try { return new ObjectMapper().reader().readTree(json); } catch (IOException e) { throw new UncheckedIOException(e); } }