Package io.sentry

Class JsonObjectWriter

All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public final class JsonObjectWriter extends JsonWriter
  • Constructor Details

    • JsonObjectWriter

      public JsonObjectWriter(Writer out, int maxDepth)
  • Method Details

    • name

      public JsonObjectWriter name(String name) throws IOException
      Description copied from class: JsonWriter
      Encodes the property name.
      Overrides:
      name in class JsonWriter
      Parameters:
      name - the name of the forthcoming value. May not be null.
      Returns:
      this writer.
      Throws:
      IOException
    • value

      public JsonObjectWriter value(@NotNull @NotNull ILogger logger, @Nullable @Nullable Object object) throws IOException
      Encodes a supported object (Null, String, Boolean, Number, Collection, Array, Map, JsonSerializable).
      Parameters:
      logger - The logger. May not be null.
      object - Object to encode. May be null.
      Returns:
      this writer.
      Throws:
      IOException