Class JsonPrimitive

java.lang.Object
blue.endless.jankson.JsonElement
blue.endless.jankson.JsonPrimitive
All Implemented Interfaces:
Cloneable

public class JsonPrimitive extends JsonElement
  • Field Details

    • TRUE

      public static JsonPrimitive TRUE
      Convenience instance of json "true". Don't use identity comparison (==) on these! Use equals instead.
    • FALSE

      public static JsonPrimitive FALSE
      Convenience instance of json "false". Don't use identity comparison (==) on these! Use equals instead.
  • Constructor Details

    • JsonPrimitive

      public JsonPrimitive(@Nonnull Object value)
      Creates a new JsonPrimitive node representing the passed-in value.

      Note: This constructor may do expensive type inspection to verify that the passed-in object is well-formed. Please use one of the JsonPrimitive.of(x) static factory variants if possible, because using function polymorphism often winds up validating the results "for free".

      Parameters:
      value -
  • Method Details