История страницы
Convert to dictionary Version 7 (Java)
Action group
Преобразовать в словарь
Группа действий: JSON
Описание
Действие преобразует JSON в словарь.
Иконка
Настройки
...
Description
The action converts JSON to a dictionary
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
---|---|---|---|---|
Parameters | ||||
JSON | JSON for converting. Note: The action does not work with JSON arrays (start with „[„). |
JSON
JSON
Robin.JSON |
Yes |
Results |
---|
Результат
Result |
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
Решение: воспользоваться действиями "Открыть", "Преобразовать в словарь".
Реализация:
...
Special conditions of use
None.
Example of use
Task
Convert the JSON test.json contents to a dictionary.
Блок кода | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"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
- Assemble a robot scheme with the actions:
- Set the "Open" action parameters.
- Set the "Convert to dictionary" action parameters.
- Click "Start" in the top panel.
Result
The program robot completed successfully. JSON was successfully converted to a dictionary.
Результат:
Программный робот отработал успешно. JSON успешно преобразован в словарь.
Обзор
Инструменты контента