code: private void writeFrame(JsonGenerator generator, SentryStackTraceElement stackTraceElement,
                              boolean commonWithEnclosing) throws IOException {
          generator.writeStartObject();
          generator.writeStringField(FILENAME_PARAMETER, stackTraceElement.getFileName());
          generator.writeStringField(MODULE_PARAMETER, stackTraceElement.getModule());
          boolean inApp = !(removeCommonFramesWithEnclosing && commonWithEnclosing) && isFrameInApp(stackTraceElement);
          generator.writeBooleanField(IN_APP_PARAMETER, inApp);
          generator.writeStringField(FUNCTION_PARAMETER, stackTraceElement.getFunction());
          generator.writeNumberField(LINE_NO_PARAMETER, stackTraceElement.getLineno());
  
          // Non-standard fields.
          if (stackTraceElement.getColno() != null) {
              generator.writeNumberField(COL_NO_PARAMETER, stackTraceElement.getColno());
          }
  
          if (stackTraceElement.getPlatform() != null) {
              generator.writeStringField(PLATFORM_PARAMTER, stackTraceElement.getPlatform());
          }
  
          if (stackTraceElement.getAbsPath() != null) {
              generator.writeStringField(ABSOLUTE_PATH_PARAMETER, stackTraceElement.getAbsPath());
          }
  
          if (stackTraceElement.getLocals() != null && !stackTraceElement.getLocals().isEmpty()) {
              generator.writeObjectFieldStart(VARIABLES_PARAMETER);
              for (Map.Entry<String, Object> varEntry : stackTraceElement.getLocals().entrySet()) {
                  generator.writeFieldName(varEntry.getKey());
                  generator.writeObject(varEntry.getValue());
              }
              generator.writeEndObject();
          }
  
          generator.writeEndObject();
      }
docs: Writes a single frame based on a {@code StackTraceElement}.
  
  @param stackTraceElement current frame in the stackTrace.