Package io.sentry
Class JsonObjectReader
java.lang.Object
io.sentry.JsonObjectReader
- All Implemented Interfaces:
ObjectReader
,Closeable
,AutoCloseable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
close()
void
endArray()
void
boolean
hasNext()
boolean
@Nullable Boolean
@Nullable Date
nextDateOrNull
(ILogger logger) double
@Nullable Double
float
@Nullable Float
int
nextInt()
@Nullable Integer
<T> @Nullable List<T>
nextListOrNull
(@NotNull ILogger logger, @NotNull JsonDeserializer<T> deserializer) long
nextLong()
@Nullable Long
nextMapOfListOrNull
(@NotNull ILogger logger, @NotNull JsonDeserializer<T> deserializer) nextMapOrNull
(@NotNull ILogger logger, @NotNull JsonDeserializer<T> deserializer) @NotNull String
nextName()
void
nextNull()
@Nullable Object
Decodes JSON into Java primitives/objects (null, boolean, int, long, double, String, Map, List) with full nesting support.<T> T
nextOrNull
(@NotNull ILogger logger, @NotNull JsonDeserializer<T> deserializer) @Nullable String
@Nullable TimeZone
nextTimeZoneOrNull
(ILogger logger) void
@NotNull JsonToken
peek()
void
setLenient
(boolean lenient) void
-
Constructor Details
-
JsonObjectReader
-
-
Method Details
-
nextStringOrNull
- Specified by:
nextStringOrNull
in interfaceObjectReader
- Throws:
IOException
-
nextDoubleOrNull
- Specified by:
nextDoubleOrNull
in interfaceObjectReader
- Throws:
IOException
-
nextFloatOrNull
- Specified by:
nextFloatOrNull
in interfaceObjectReader
- Throws:
IOException
-
nextFloat
- Specified by:
nextFloat
in interfaceObjectReader
- Throws:
IOException
-
nextLongOrNull
- Specified by:
nextLongOrNull
in interfaceObjectReader
- Throws:
IOException
-
nextIntegerOrNull
- Specified by:
nextIntegerOrNull
in interfaceObjectReader
- Throws:
IOException
-
nextBooleanOrNull
- Specified by:
nextBooleanOrNull
in interfaceObjectReader
- Throws:
IOException
-
nextUnknown
- Specified by:
nextUnknown
in interfaceObjectReader
-
nextListOrNull
@Nullable public <T> @Nullable List<T> nextListOrNull(@NotNull @NotNull ILogger logger, @NotNull @NotNull JsonDeserializer<T> deserializer) throws IOException - Specified by:
nextListOrNull
in interfaceObjectReader
- Throws:
IOException
-
nextMapOrNull
@Nullable public <T> @Nullable Map<String,T> nextMapOrNull(@NotNull @NotNull ILogger logger, @NotNull @NotNull JsonDeserializer<T> deserializer) throws IOException - Specified by:
nextMapOrNull
in interfaceObjectReader
- Throws:
IOException
-
nextMapOfListOrNull
@Nullable public <T> @Nullable Map<String,List<T>> nextMapOfListOrNull(@NotNull @NotNull ILogger logger, @NotNull @NotNull JsonDeserializer<T> deserializer) throws IOException - Specified by:
nextMapOfListOrNull
in interfaceObjectReader
- Throws:
IOException
-
nextOrNull
@Nullable public <T> T nextOrNull(@NotNull @NotNull ILogger logger, @NotNull @NotNull JsonDeserializer<T> deserializer) throws Exception - Specified by:
nextOrNull
in interfaceObjectReader
- Throws:
Exception
-
nextDateOrNull
- Specified by:
nextDateOrNull
in interfaceObjectReader
- Throws:
IOException
-
nextTimeZoneOrNull
- Specified by:
nextTimeZoneOrNull
in interfaceObjectReader
- Throws:
IOException
-
nextObjectOrNull
Decodes JSON into Java primitives/objects (null, boolean, int, long, double, String, Map, List) with full nesting support. To be used at the root level or after calling `nextName()`.- Specified by:
nextObjectOrNull
in interfaceObjectReader
- Returns:
- The deserialized object from json.
- Throws:
IOException
-
peek
- Specified by:
peek
in interfaceObjectReader
- Throws:
IOException
-
nextName
- Specified by:
nextName
in interfaceObjectReader
- Throws:
IOException
-
beginObject
- Specified by:
beginObject
in interfaceObjectReader
- Throws:
IOException
-
endObject
- Specified by:
endObject
in interfaceObjectReader
- Throws:
IOException
-
beginArray
- Specified by:
beginArray
in interfaceObjectReader
- Throws:
IOException
-
endArray
- Specified by:
endArray
in interfaceObjectReader
- Throws:
IOException
-
hasNext
- Specified by:
hasNext
in interfaceObjectReader
- Throws:
IOException
-
nextInt
- Specified by:
nextInt
in interfaceObjectReader
- Throws:
IOException
-
nextLong
- Specified by:
nextLong
in interfaceObjectReader
- Throws:
IOException
-
nextString
- Specified by:
nextString
in interfaceObjectReader
- Throws:
IOException
-
nextBoolean
- Specified by:
nextBoolean
in interfaceObjectReader
- Throws:
IOException
-
nextDouble
- Specified by:
nextDouble
in interfaceObjectReader
- Throws:
IOException
-
nextNull
- Specified by:
nextNull
in interfaceObjectReader
- Throws:
IOException
-
setLenient
public void setLenient(boolean lenient) - Specified by:
setLenient
in interfaceObjectReader
-
skipValue
- Specified by:
skipValue
in interfaceObjectReader
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-