Convert to dictionary Version 7 (Java)

Action group: JSON 


Description

The action converts JSON to a dictionary

Action icon


Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
JSONJSON for converting. Note: The action does not work with JSON arrays (start with „[„).Robin.JSON
Yes
Results
ResultThe 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

Special conditions of use 

None.

Example of use 

Task

Convert the JSON test.json contents to a dictionary. 

test.json
{
	"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: 


  2. Set the "Open" action parameters. 


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


  4. Click "Start" in the top panel. 

Result

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

  • Нет меток