Interface IJsonContentMatcher<C,​R>

  • Type Parameters:
    C - Type of the context passed to the matcher methods.
    R - Type of the result.

    public interface IJsonContentMatcher<C,​R>
    Matches the contents of a JSON value, depending on whether it is a JSON primitive value, an array, or an object.
    Since:
    8.2.0
    • Method Detail

      • array

        R array​(C context,
                Iterable<?> items)
        Matches a JSON array.
        Parameters:
        context - The context provided by the caller.
        items - The matched JSON array items.
        Returns:
        The result of processing the matches JSON array.
      • object

        R object​(C context,
                 Iterable<? extends Map.Entry<?,​?>> entries)
        Matches a JSON object.
        Parameters:
        context - The context provided by the caller.
        entries - The matched JSON object entries.
        Returns:
        The result of processing the matches JSON object.
      • primitive

        R primitive​(C context,
                    Object value)
        Matches a JSON primitive value.
        Parameters:
        context - The context provided by the caller.
        value - The matched JSON primitive value.
        Returns:
        The result of processing the matches JSON primitive value.