use of software.amazon.awssdk.iot.ShadowStateFactory in project aws-iot-device-sdk-java-v2 by aws.
the class IotShadowClient method addTypeAdapters.
private void addTypeAdapters(GsonBuilder gson) {
ShadowStateFactory shadowStateFactory = new ShadowStateFactory();
gson.registerTypeAdapterFactory(shadowStateFactory);
}
use of software.amazon.awssdk.iot.ShadowStateFactory in project aws-iot-device-sdk-java-v2 by aws.
the class ShadowStateTest method TestSetup.
@BeforeEach
public void TestSetup() {
if (shadowGson == null) {
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.disableHtmlEscaping();
gsonBuilder.registerTypeAdapter(Timestamp.class, new Timestamp.Serializer());
gsonBuilder.registerTypeAdapter(Timestamp.class, new Timestamp.Deserializer());
ShadowStateFactory shadowStateFactory = new ShadowStateFactory();
gsonBuilder.registerTypeAdapterFactory(shadowStateFactory);
shadowGson = gsonBuilder.create();
}
}
Aggregations