Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

Compare Version 6 (Java)

Action group

Сравнить 

Группа действий: JSON 

Описание

Действие сравнивает два JSON и возвращает true, если они одинаковые, и false, если нет. 

Иконка

Image Removed

Настройки

...

Description

The action compares two JSON files and returns "true" if they are same, and "false" if not.

Action icon

Image Added

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
First JSONFirst JSON for comparing
СвойствоАнгл. наименованиеОписаниеТипПример заполненияОбязательность заполнения поляПараметры

Первый JSON

First JSON

Первый JSON для сравнения
Robin.JSON
Да

Yes
Второй
Second JSONSecond JSON
Второй JSON для сравнения
for comparingRobin.JSON
Да

Yes
РезультатыРезультат
Results
Result
Логическая переменная, значение которой равно true, если файлы равны, иначе -
Logical variable whose value is true if files are equal, otherwise false.Robin.Booleantrue

Особые условия использования

Отсутствуют

Пример использования 

Задача: сравнить 2 JSON файла: 

Image RemovedImage Removed

Решение: воспользоваться действиями "Открыть", "Сравнить". 

Реализация:

...


Special conditions of use

None.

Example of use

Task

Compare two JSON files.

The first file test.json:

Блок кода
titletest.json
linenumberstrue
collapsetrue
{
	"firstname":"Joe",
	"lastname": "Jackson",
	"gender":"male",
	"age": 28,
	"address": {
		"streetAddress": "101",
		"city": "San Diego",
		"state": "CA"
	},
	"phonenumber": [
	{ "type": "home", "number": "9349282382"}
	]
}

The second file test 2.json:

Блок кода
titletest 2.json
linenumberstrue
collapsetrue
{
	"firstname":"Joil",
	"lastname": "Jackson",
	"gender":"male",
	"age": 31,
	"address": {
		"streetAddress": "101",
		"city": "San Diego",
		"state": "CA"
	},
	"phonenumber": [
	{ "type": "home", "number": "79349282382"}
	]
}

Solution 

Use the "Open", "Compare" actions. 

Implementation

  1. Assemble a robot scheme with the actions.
    Image Added
  2. Set the "Open" action parameters (1st file).
    Image Added
  3. Set the "Open" action parameters (2nd file).
    Image Added
  4. Set the "Compare" action parameters.
    Image Added
  5. Click "Start" in the top panel.

Result

The program robot completed successfully. The contents of the two files are different.

Image Added

Результат: 

Программный робот отработал успешно. Содержимое файлов различно. 

Image Removed