Code example for JsonPrimitive

0
    } 
 
    public static class IdentifierTypeSerializer implements JsonSerializer<IdentifierType> {
        @Override 
        public JsonElement serialize(IdentifierType src, Type typeOfSrc, JsonSerializationContext context) {
            return new JsonPrimitive(src.getUuid());
        } 
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java