src/main/java/com/arpnetworking/logback/serialization/steno/ArraySerialziationStrategy.java
public String serialize(
            final ILoggingEvent event,
            final String eventName,
            @Nullable final String[] keys,
            @Nullable final Object[] values)
            throws Exception {

        final StringWriter jsonWriter = new StringWriter();
        final JsonGenerator jsonGenerator = _jsonFactory.createGenerator(jsonWriter);

        // Start wrapper
        StenoSerializationHelper.startStenoWrapper(event, eventName, jsonGenerator, _objectMapper);

        // Write event data
        jsonGenerator.writeObjectFieldStart("data");
        final int argsLength = values == null ? 0 : values.length;
        if (keys != null) {
            for (int i = 0; i < keys.length; i++) {
                if (i >= argsLength) {
                    jsonGenerator.writeObjectField(keys[i], null);
                } else if (StenoSerializationHelper.isSimpleType(values[i])) {
                    jsonGenerator.writeObjectField(keys[i], values[i]);
                } else {
                    jsonGenerator.writeFieldName(keys[i]);
                    _objectMapper.writeValue(
                            jsonGenerator,
                            values[i]);
                }
            }
        }
        jsonGenerator.writeEndObject(); // End 'data' field

        // Output throwable
        StenoSerializationHelper.writeThrowable(event.getThrowableProxy(), jsonGenerator, _objectMapper);

        // End wrapper
        StenoSerializationHelper.endStenoWrapper(event, eventName, jsonGenerator, _objectMapper, _encoder);

        return jsonWriter.toString();
    }
public String serialize(
            final ILoggingEvent event,
            final String eventName,
            @Nullable final String[] keys,
            @Nullable final Object[] values)
            throws Exception {

        final StringWriter jsonWriter = new StringWriter();
        final JsonGenerator jsonGenerator = _jsonFactory.createGenerator(jsonWriter);

        // Start wrapper
        StenoSerializationHelper.startStenoWrapper(event, eventName, jsonGenerator, _objectMapper);

        // Write event data
        jsonGenerator.writeObjectFieldStart("data");
        final int argsLength = values == null ? 0 : values.length;
        if (keys != null) {
            for (int i = 0; i < keys.length; i++) {
                if (i >= argsLength) {
                    jsonGenerator.writeObjectField(keys[i], null);
                } else if (StenoSerializationHelper.isSimpleType(values[i])) {
                    jsonGenerator.writeObjectField(keys[i], values[i]);
                } else {
                    jsonGenerator.writeFieldName(keys[i]);
                    _objectMapper.writeValue(
                            jsonGenerator,
                            values[i]);
                }
            }
        }
        jsonGenerator.writeEndObject(); // End 'data' field

        // Output throwable
        StenoSerializationHelper.writeThrowable(event.getThrowableProxy(), jsonGenerator, _objectMapper);

        // End wrapper
        StenoSerializationHelper.endStenoWrapper(event, eventName, jsonGenerator, _objectMapper, _encoder);

        return jsonWriter.toString();
    }
Serialize an event.

@param event The event.
@param eventName The event name.
@param keys The message keys.
@param values The message values.
@return Serialization of message as a <code>String</code>.
@throws Exception Serialization may throw any <code>Exception</code>.