From ac4aea47b0b3797714e85f26b4af8ffb996bb155 Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Tue, 24 Mar 2015 22:37:09 +0100 Subject: [PATCH] json deserializer: don't fail on unknown props, thus allowing us to upgrade the schemas without breaking running IDEs --- .../cc/arduino/contributions/libraries/LibrariesIndexer.java | 2 +- .../cc/arduino/contributions/packages/ContributionsIndexer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java index deaaeec90..86cfcbd1f 100644 --- a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java +++ b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java @@ -74,7 +74,7 @@ public class LibrariesIndexer { mapper.registerModule(new MrBeanModule()); mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true); mapper.configure(DeserializationFeature.EAGER_DESERIALIZER_FETCH, true); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); index = mapper.readValue(indexIn, LibrariesIndex.class); for (ContributedLibrary library : index.getLibraries()) { diff --git a/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java b/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java index ce96187a6..a5a069c0f 100644 --- a/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java +++ b/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java @@ -98,7 +98,7 @@ public class ContributionsIndexer { mapper.registerModule(new MrBeanModule()); mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true); mapper.configure(DeserializationFeature.EAGER_DESERIALIZER_FETCH, true); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); index = mapper.readValue(indexIn, ContributionsIndex.class); }