Interface GsonDataComponentValue

All Superinterfaces:
DataComponentValue

public sealed interface GsonDataComponentValue extends DataComponentValue
An DataComponentValue implementation that holds a JsonElement.

This holder is exposed to allow conversions to/from gson data holders.

Since:
4.17.0
  • Method Details

    • gsonDataComponentValue

      static GsonDataComponentValue gsonDataComponentValue(com.google.gson.JsonElement data)
      Create a box for item data that can be understood by the gson serializer.
      Parameters:
      data - the item data to hold
      Returns:
      a newly created item data holder instance
      Since:
      4.17.0
    • element

      com.google.gson.JsonElement element()
      The contained element, intended for read-only use.
      Returns:
      a copy of the contained element
      Since:
      4.17.0