Interface JsonUtils


public interface JsonUtils
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.google.gson.Gson
     
    static final com.mojang.serialization.MapLike<com.google.gson.JsonElement>
     
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static @Nullable com.google.gson.JsonArray
    arrayOf(dev.latvian.mods.rhino.Context cx, @Nullable Object array)
     
    static com.google.gson.JsonElement
    copy(@Nullable com.google.gson.JsonElement element)
     
    static com.google.gson.JsonElement
    fromString(@Nullable String string)
     
    static @Nullable com.google.gson.JsonObject
    objectOf(dev.latvian.mods.rhino.Context cx, @Nullable Object map)
     
    static com.google.gson.JsonElement
    of(dev.latvian.mods.rhino.Context cx, @Nullable Object o)
     
    static com.google.gson.JsonPrimitive
    primitiveOf(dev.latvian.mods.rhino.Context cx, @Nullable Object o)
     
    static @Nullable Object
    toObject(@Nullable com.google.gson.JsonElement json)
     
    static String
    toPrettyString(com.google.gson.JsonElement json)
     
    static @Nullable Object
    toPrimitive(@Nullable com.google.gson.JsonElement element)
     
    static String
    toString(com.google.gson.JsonElement json)
     
  • Field Details

    • GSON

      @HideFromJS static final com.google.gson.Gson GSON
    • MAP_LIKE

      static final com.mojang.serialization.MapLike<com.google.gson.JsonElement> MAP_LIKE
  • Method Details

    • copy

      static com.google.gson.JsonElement copy(@Nullable @Nullable com.google.gson.JsonElement element)
    • of

      static com.google.gson.JsonElement of(dev.latvian.mods.rhino.Context cx, @Nullable @Nullable Object o)
    • primitiveOf

      static com.google.gson.JsonPrimitive primitiveOf(dev.latvian.mods.rhino.Context cx, @Nullable @Nullable Object o)
    • objectOf

      @Nullable static @Nullable com.google.gson.JsonObject objectOf(dev.latvian.mods.rhino.Context cx, @Nullable @Nullable Object map)
    • arrayOf

      @Nullable static @Nullable com.google.gson.JsonArray arrayOf(dev.latvian.mods.rhino.Context cx, @Nullable @Nullable Object array)
    • toObject

      @Nullable static @Nullable Object toObject(@Nullable @Nullable com.google.gson.JsonElement json)
    • toString

      static String toString(com.google.gson.JsonElement json)
    • toPrettyString

      static String toPrettyString(com.google.gson.JsonElement json)
    • fromString

      static com.google.gson.JsonElement fromString(@Nullable @Nullable String string)
    • toPrimitive

      @Nullable static @Nullable Object toPrimitive(@Nullable @Nullable com.google.gson.JsonElement element)