Class JsonWrapper

java.lang.Object
com.marcusslover.plus.lib.json.JsonWrapper

public class JsonWrapper extends Object
  • Constructor Details

    • JsonWrapper

      public JsonWrapper(@NotNull @NotNull com.google.gson.JsonElement jsonElement)
  • Method Details

    • getJsonElement

      @NotNull public @NotNull com.google.gson.JsonElement getJsonElement()
    • setJsonElement

      @NotNull public @NotNull JsonWrapper setJsonElement(@NotNull @NotNull com.google.gson.JsonElement jsonElement)
    • forEach

      @NotNull public @NotNull JsonWrapper forEach(@NotNull @NotNull Consumer<com.google.gson.JsonElement> consumer)
    • isJsonObject

      public boolean isJsonObject()
    • isJsonPrimitive

      public boolean isJsonPrimitive()
    • isJsonArray

      public boolean isJsonArray()
    • remove

      @NotNull public @NotNull JsonWrapper remove(@NotNull @NotNull String key)
    • hasKey

      public boolean hasKey(@NotNull @NotNull String key)
    • set

      @NotNull public @NotNull JsonWrapper set(@NotNull @NotNull String key, @Nullable @Nullable Object value)
    • get

      @NotNull public <T> T get(@NotNull @NotNull String key, @Nullable T defaultValue, @NotNull @NotNull Class<T> type)
    • set

      @NotNull public @NotNull JsonWrapper set(@NotNull @NotNull String key, @Nullable @Nullable String value)
    • get

      @NotNull public @NotNull String get(@NotNull @NotNull String key, @Nullable @Nullable String defaultValue)
    • set

      @NotNull public @NotNull JsonWrapper set(@NotNull @NotNull String key, @Nullable @Nullable Number value)
    • get

      @NotNull public @NotNull Number get(@NotNull @NotNull String key, @Nullable @Nullable Number defaultValue)
    • set

      @NotNull public @NotNull JsonWrapper set(@NotNull @NotNull String key, @Nullable @Nullable Character value)
    • get

      @NotNull public @NotNull Character get(@NotNull @NotNull String key, @Nullable @Nullable Character defaultValue)
    • set

      @NotNull public @NotNull JsonWrapper set(@NotNull @NotNull String key, @Nullable @Nullable Boolean value)
    • get

      @NotNull public @NotNull Boolean get(@NotNull @NotNull String key, @Nullable @Nullable Boolean defaultValue)