List of usage examples for com.google.gson.internal.bind MapTypeAdapterFactory MapTypeAdapterFactory
public MapTypeAdapterFactory(ConstructorConstructor constructorConstructor, boolean complexMapKeySerialization)
From source file:org.eclipse.smarthome.storage.json.PropertiesTypeAdapter.java
License:Open Source License
public PropertiesTypeAdapter(Gson gson) { // obtain the default type adapters for String and Object classes keyAdapter = gson.getAdapter(String.class); valueAdapter = gson.getAdapter(Object.class); // obtain default gson objects constructor = new ConstructorConstructor(Collections.<Type, InstanceCreator<?>>emptyMap()); delegate = new MapTypeAdapterFactory(constructor, false).create(new Gson(), TOKEN); }