Package io.sentry

Class JsonObjectWriter

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

    public final class JsonObjectWriter
    extends JsonWriter
    • Constructor Detail

      • JsonObjectWriter

        public JsonObjectWriter​(java.io.Writer out,
                                int maxDepth)
    • Method Detail

      • name

        public JsonObjectWriter name​(java.lang.String name)
                              throws java.io.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:
        java.io.IOException
      • value

        public JsonObjectWriter value​(@NotNull
                                      @NotNull ILogger logger,
                                      @Nullable
                                      @Nullable java.lang.Object object)
                               throws java.io.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:
        java.io.IOException