is_equal_json: Determine if two JSON objects are the same

View source: R/is_equal_json.R

is_equal_jsonR Documentation

Determine if two JSON objects are the same

Description

Determine if two JSON objects are the same

Usage

is_equal_json(json_1, json_2)

Arguments

json_1

a JSON object, as returned by read_json

json_2

a JSON object, as returned by read_json

Value

TRUE if the objects are the same

Author(s)

Richèl J.C. Bilderbeek

Examples

# Using an example file
example_model <- read_model_file(get_gcaer_filename("M0.json"))
is_equal_json(example_model, example_model)

# Using GCAE files
if (is_gcae_repo_cloned()) {
  m0 <- read_model_file(get_gcae_model_filename("M0"))
  m1 <- read_model_file(get_gcae_model_filename("M1"))
  is_equal_json(m0, m1)
}

richelbilderbeek/gcaer documentation built on March 25, 2024, 3:08 p.m.