[Jackson 2.x] Méthode createJsonParser depreciée
Bonjour,
j'utilise cette potion de code afin de créer mon parser jackson comme ceci:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| @SuppressWarnings("deprecation")
public static void main(String[] args) {
ObjectMapper mapper = new ObjectMapper();
try {
mapper.getFactory().createJsonParser(new FileReader("test.json"));
} catch (JsonParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} |
a cette ligne mapper.getFactory().createJsonParser(new FileReader("test.json")); mon ide barre la ligne, elle est déprécié.
Y a t il une nouvelle façon de créer le parseur?
Merci