code: protected Marshaller createMarshaller(Dsn dsn) {
          int maxMessageLength = getMaxMessageLength(dsn);
          JsonMarshaller marshaller = createJsonMarshaller(maxMessageLength);
  
          // Set JSON marshaller bindings
          StackTraceInterfaceBinding stackTraceBinding = new StackTraceInterfaceBinding();
          // Enable common frames hiding unless its value is 'false'.
          stackTraceBinding.setRemoveCommonFramesWithEnclosing(getHideCommonFramesEnabled(dsn));
          stackTraceBinding.setInAppFrames(getInAppFrames(dsn));
  
          marshaller.addInterfaceBinding(StackTraceInterface.class, stackTraceBinding);
          marshaller.addInterfaceBinding(ExceptionInterface.class, new ExceptionInterfaceBinding(stackTraceBinding));
          marshaller.addInterfaceBinding(MessageInterface.class, new MessageInterfaceBinding(maxMessageLength));
          marshaller.addInterfaceBinding(UserInterface.class, new UserInterfaceBinding());
          marshaller.addInterfaceBinding(DebugMetaInterface.class, new DebugMetaInterfaceBinding());
          HttpInterfaceBinding httpBinding = new HttpInterfaceBinding();
          //TODO: Add a way to clean the HttpRequest
          //httpBinding.
          marshaller.addInterfaceBinding(HttpInterface.class, httpBinding);
  
          // Enable compression unless the option is set to false
          marshaller.setCompression(getCompressionEnabled(dsn));
  
          return marshaller;
      }
docs: Creates a JSON marshaller that will convert every {@link io.sentry.event.Event} in a format
  handled by the Sentry server.
  
  @param dsn Data Source Name of the Sentry server.
  @return a {@link JsonMarshaller} to process the events.