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

Ключ

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

Convert to dictionary Version 7 (Java)

Action group

Преобразовать в словарь

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

Описание

Действие преобразует JSON в словарь.

Иконка

Image Removed

Настройки

...

Description

The action converts JSON to a dictionary

Action icon

Image Added

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
JSONJSON for converting. Note: The action does not work with JSON arrays (start with „[„).
СвойствоАнгл. наименованиеОписаниеТипПример заполненияОбязательность заполнения поляПараметры

JSON

JSON

JSON для преобразования
Robin.JSON
Да

Yes
Результаты
Results

Результат

Result
Словарь, который содержит данные из JSON
The dictionary, which contains the data from the JSON. Note: because a map is an unordered data structure, the order of the JSON elements is not preserved during conversion.Robin.Dictionary

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

Отсутствуют.

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

Задача: преобразовать в словарь содержимое JSON sample2.json 

Image Removed

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

Реализация:

...



Special conditions of use 

None.

Example of use 

Task

Convert the JSON test.json contents to a dictionary. 

Блок кода
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"}
	]
}

Solution

Use the "Open, "Convert to dictionary" actions. 

Implementation

  1. Assemble a robot scheme with the actions: 
    Image Added

  2. Set the "Open" action parameters. 
    Image Added

  3. Set the "Convert to dictionary" action parameters.  
    Image Added

  4. Click "Start" in the top panel. 

Result

The program robot completed successfully. JSON was successfully converted to a dictionary. 

Image Added

Результат: 

Программный робот отработал успешно. JSON успешно преобразован в словарь. 

Image Removed