All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.redhat.insights.reports.AppInsightsReportSerializer Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
/* Copyright (C) Red Hat 2022-2023 */
package com.redhat.insights.reports;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;

/** A generic Java application {@link InsightsSubreport} JSON serializer implementation. */
public class AppInsightsReportSerializer extends JsonSerializer {

  @Override
  public void serialize(
      InsightsSubreport appInsightsReportAdapter,
      JsonGenerator generator,
      SerializerProvider serializerProvider)
      throws IOException {
    generator.writeStartObject();
    // Put some identifying text here
    generator.writeStringField("type", "General Java app");
    generator.writeEndObject();
    generator.flush();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy