Package tenapull.data.deserialize
Class SeverityCountsReducer
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<SeverityCount>
tenapull.data.deserialize.SeverityCountsReducer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
public class SeverityCountsReducer extends com.fasterxml.jackson.databind.JsonSerializer<SeverityCount>
Serializer for simplifying the list of SeverityLevelCount beans into a series of single text values,
used for serializing the output.
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description SeverityCountsReducer()
-
Method Summary
Modifier and Type Method Description void
serialize(SeverityCount sc, com.fasterxml.jackson.core.JsonGenerator jg, com.fasterxml.jackson.databind.SerializerProvider sp)
Converts a SeverityCount's list of SeverityLevelCounts into a series of text fields, with a key of "level_#" (where # represents the level value of the SeverityLevelCount) and a value taken from the "count" field representing the SeverityLevelCount
-
Constructor Details
-
SeverityCountsReducer
public SeverityCountsReducer()
-
-
Method Details
-
serialize
public void serialize(SeverityCount sc, com.fasterxml.jackson.core.JsonGenerator jg, com.fasterxml.jackson.databind.SerializerProvider sp) throws java.io.IOExceptionConverts a SeverityCount's list of SeverityLevelCounts into a series of text fields, with a key of "level_#" (where # represents the level value of the SeverityLevelCount) and a value taken from the "count" field representing the SeverityLevelCount- Specified by:
serialize
in classcom.fasterxml.jackson.databind.JsonSerializer<SeverityCount>
- Parameters:
sc
- the SeverityCount wrapper which contains the list of SeverityLevelCountsjg
-sp
-- Throws:
java.io.IOException
-