Json_expressions

screenshot of Json_expressions

JSON matchmaking for all your API testing needs.

Overview

The JSON Expressions tool provides an efficient way to ensure that your API returns the expected JSON structure to developers without the need for manual checks. By using simple and readable Ruby code, developers can define the structure and content of the JSON they are expecting, while also allowing flexibility in the approach.

Features

  • Basic Matching: Easily express the structure of JSON objects.
  • Wildcard Matching: Ignore keys that are not relevant for matching.
  • Object Equality: Match values using Object#== or specialized behaviors.
  • Regular Expressions: Use Regexp to match patterns within JSON.
  • Type Matching: Determine if values in JSON match specific types.
  • Ranges: Include range matching for values in JSON.
  • Capturing: Capture specific keys in JSON for later use.

Summary

JSON Expressions simplifies the process of verifying the structure and content of JSON returned by APIs. By leveraging Ruby code, developers can easily define their expectations while maintaining flexibility. The tool offers features such as basic matching, wildcard matching, object equality checks, support for regular expressions, type matching, range comparisons, and capturing specific keys within JSON objects. By incorporating JSON Expressions into testing workflows, developers can ensure API consistency and prevent inadvertent changes that may impact API consumers.