<commit_before>package valandur.webapi.json.serializer.plugin;

import valandur.webapi.api.cache.plugin.ICachedPluginDependency;
import valandur.webapi.api.json.WebAPIBaseSerializer;
import valandur.webapi.cache.plugin.CachedPluginContainer;

import java.io.IOException;

public class CachedPluginContainerSerializer extends WebAPIBaseSerializer<CachedPluginContainer> {

    @Override
    public void serialize(CachedPluginContainer value) throws IOException {
        writeStartObject();

        writeField("id", value.getId());
        writeField("name", value.getName());
        writeField("version", value.getVersion());

        if (shouldWriteDetails()) {
            writeField("class", value.getClass());
            writeField("description", value.getDescription());
            writeField("url", value.getUrl());
            writeField("authors", value.getAuthors());
            writeArrayFieldStart("dependencies");
            for (ICachedPluginDependency dependency : value.getDependencies()) {
                writeValue(dependency);
            }
            writeEndArray();<commit_msg>fix(json): Remove class field from PluginContainer json serializer<commit_after>package valandur.webapi.json.serializer.plugin;

import valandur.webapi.api.cache.plugin.ICachedPluginDependency;
import valandur.webapi.api.json.WebAPIBaseSerializer;
import valandur.webapi.cache.plugin.CachedPluginContainer;

import java.io.IOException;

public class CachedPluginContainerSerializer extends WebAPIBaseSerializer<CachedPluginContainer> {

    @Override
    public void serialize(CachedPluginContainer value) throws IOException {
        writeStartObject();

        writeField("id", value.getId());
        writeField("name", value.getName());
        writeField("version", value.getVersion());

        if (shouldWriteDetails()) {
            writeField("description", value.getDescription());
            writeField("url", value.getUrl());
            writeField("authors", value.getAuthors());
            writeArrayFieldStart("dependencies");
            for (ICachedPluginDependency dependency : value.getDependencies()) {
                writeValue(dependency);
            }
            writeEndArray();
{'fraction_non_alphanumeric': 0.1093044263775971, 'fraction_numerical': 0.0, 'mean_word_length': 3.604989604989605, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6991987', 'n_tokens_mistral': 555, 'n_tokens_neox': 542, 'n_words': 96}