mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
json deserializer: don't fail on unknown props, thus allowing us to upgrade the schemas without breaking running IDEs
This commit is contained in:
parent
60dac7e59d
commit
ac4aea47b0
@ -74,7 +74,7 @@ public class LibrariesIndexer {
|
|||||||
mapper.registerModule(new MrBeanModule());
|
mapper.registerModule(new MrBeanModule());
|
||||||
mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
|
mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
|
||||||
mapper.configure(DeserializationFeature.EAGER_DESERIALIZER_FETCH, 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);
|
index = mapper.readValue(indexIn, LibrariesIndex.class);
|
||||||
|
|
||||||
for (ContributedLibrary library : index.getLibraries()) {
|
for (ContributedLibrary library : index.getLibraries()) {
|
||||||
|
@ -98,7 +98,7 @@ public class ContributionsIndexer {
|
|||||||
mapper.registerModule(new MrBeanModule());
|
mapper.registerModule(new MrBeanModule());
|
||||||
mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
|
mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
|
||||||
mapper.configure(DeserializationFeature.EAGER_DESERIALIZER_FETCH, 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);
|
index = mapper.readValue(indexIn, ContributionsIndex.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user