Returns either the data itself, if it is an element of the values, or a JsonAccessError. An input of JsonAccessError is immediately returned.
data
values
JsonAccessError
supposedly a value contained in the given values
the allowed values for the data.
data, correctly typed, or JsonAccessError
Returns either the
dataitself, if it is an element of thevalues, or aJsonAccessError. An input ofJsonAccessErroris immediately returned.