@brian_ls Ok - After searching around a bit I added io.fusionauth/fusionauth-java-client (1.27.2) to my dependencies and changed the snippet to:
ObjectMapper mapper = new ObjectMapper().registerModule(new JavaTimeModule());
BaseEvent event = mapper.readValue(newEvent, BaseEvent.class);
Where BaseEvent is io.fusionauth.domain.event.BaseEvent.
Unfortunately, the second line above throws an exception:
com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve subtype of [simple type, class io.fusionaut
h.domain.event.BaseEvent]: missing type id property ’type’
at [Source: (String)"{"event":{"type":"user.registration.create","applicationId":"b5d6a4a3-79ac-4413-a76b-f4432f6ad12d"
The text of the event is below, which does include a 'type' field... Any help is appreciated:
{
"event": {
"type": "user.registration.create",
"applicationId": "b5d6a4a3-79ac-4413-a76b-f4432f6ad12d",
"createInstant": 1622042134608,
"id": "f6e820d8-3482-4850-963c-d7bdeb04f588",
"registration": {
"applicationId": "b5d6a4a3-79ac-4413-a76b-f4432f6ad12d",
"id": "ad296086-c180-4593-b7b1-d81714b7b485",
"insertInstant": 1622042134606,
"lastLoginInstant": 1622042134606,
"lastUpdateInstant": 1622042134606,
"timezone": "America/Denver",
"username": "brian_ls@something.net",
"usernameStatus": "ACTIVE",
"verified": true
},
"tenantId": "fb3e777b-f716-2336-45c8-3173aa1713ae",
"user": {
"active": true,
"connectorId": "e3306678-a53a-4964-9040-1c96f36dda72",
"email": "brian_ls@something.net",
"firstName": "Brian",
"id": "7ea49170-3f58-4b9f-829d-99c2856d5004",
"insertInstant": 1620124501627,
"lastLoginInstant": 1622042134606,
"lastName": "Sellden",
"lastUpdateInstant": 1621966190205,
"middleName": "Lloyd",
"mobilePhone": "3035552294",
"passwordChangeRequired": false,
"passwordLastUpdateInstant": 1620124501700,
"tenantId": "fb3e777b-f716-2336-45c8-3173aa1713ae",
"timezone": "America/Denver",
"twoFactor": {},
"usernameStatus": "ACTIVE",
"verified": true
}
}
}
Thank you - Brian.