test_that_json v0.6.0 TestThatJson.Json
Link to this section Summary
Functions
Receives a subject and a value and returns whether they are equal
Receives a subject and a value and returns whether the subject has all keys specified by the value
Receives a subject and a value and returns whether the subject contains only the keys specified by the value
Receives a subject and a value and returns whether the subject contains only the properties (or key value pairs) specified by the value
Receives a subject and a value and returns whether the subject contains only the values specified by the value
Receives a subject and a path and returns whether the path exists within the subject
Receives a subject and a value and returns whether the subject contains the properties (or key value pairs) specified by the value
Receives a subject and an integer and returns with the subject has a size equal to the integer
Receives a subject and a JSON type as an atom and returns whether the subject is that type
Receives a subject and a value and returns whether the subject contains the values specified by the value
Link to this section Types
json_value() :: json_object() | json_array() | json_string() | json_number()
Link to this section Functions
Receives a subject and a value and returns whether they are equal.
has_keys?(json_object(), json_array() | json_string()) :: boolean()
Receives a subject and a value and returns whether the subject has all keys specified by the value.
has_only_keys?(json_object(), json_array() | json_string()) :: boolean()
Receives a subject and a value and returns whether the subject contains only the keys specified by the value.
has_only_properties?(json_object(), json_object()) :: boolean()
Receives a subject and a value and returns whether the subject contains only the properties (or key value pairs) specified by the value.
has_only_values?(json_value(), json_value()) :: boolean()
Receives a subject and a value and returns whether the subject contains only the values specified by the value.
has_path?(json_object() | json_array(), String.t()) :: boolean()
Receives a subject and a path and returns whether the path exists within the subject.
has_properties?(json_object(), json_object()) :: boolean()
Receives a subject and a value and returns whether the subject contains the properties (or key value pairs) specified by the value.
Receives a subject and an integer and returns with the subject has a size equal to the integer.
Receives a subject and a JSON type as an atom and returns whether the subject is that type.
Valid types: :object
, :array
, :string
, :number
, :integer
, :float
, :boolean
, :null
.
has_values?(json_value(), json_value()) :: boolean()
Receives a subject and a value and returns whether the subject contains the values specified by the value.
If the value is a list, returns whether all values in the list are in the subject.
If the value is a JSON array as a String.t
, it is not treated the same as
a list. Instead, returns whether that list itself is one of the values in the subject.