JSONObject.require

  1. inout(JSONValue) require(string name)
  2. inout(T) require(string name)
  3. inout(T) require(string name, T fallback)
  4. inout(Nullable!T) require(string name)
    struct JSONObject
    inout
    inout(Nullable!T)
    require
    (
    U : Nullable!T
    T
    )
    (
    string name
    )

Throws

JSONException when the name is an attribute of the object but the value is not of the required type.

Meta