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

import org.spongepowered.api.command.CommandSource;
import valandur.webapi.api.json.WebAPIBaseSerializer;

import java.io.IOException;

public class CommandSourceSerializer extends WebAPIBaseSerializer<CommandSource> {
    @Override
    public void serialize(CommandSource value) throws IOException {
        writeValue(value.getName());
    }
}<commit_msg>fix(json): Improve command source serializer<commit_after>package valandur.webapi.json.serializer.misc;

import org.spongepowered.api.command.CommandSource;
import valandur.webapi.api.json.WebAPIBaseSerializer;

import java.io.IOException;

public class CommandSourceSerializer extends WebAPIBaseSerializer<CommandSource> {
    @Override
    public void serialize(CommandSource value) throws IOException {
        writeStartObject();
        writeField("id", value.getIdentifier());
        writeField("name", value.getName());
        writeEndObject();
    }
}
{'fraction_non_alphanumeric': 0.09489795918367347, 'fraction_numerical': 0.0, 'mean_word_length': 5.169811320754717, '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': '4630380', 'n_tokens_mistral': 270, 'n_tokens_neox': 267, 'n_words': 51}