Documentation

Una is developed by Una Technologies Limited

All rights reserved

© 2022 Una Technologies Limited

Print

Translating the Screen Item to JsonValue

Convert to JsonValue

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"Json_toJsonValue\" disabled=\"true\" x=\"-22\" y=\"112\"/></xml>"}
				
			

This is used to convent the Screen Item to Json Value.

Parameters: Screen Item

Output: Json Value

Sample code:

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"pxt-on-start\" x=\"0\" y=\"0\"><statement name=\"HANDLER\"><block type=\"basic_consoleLogText\"><value name=\"text\"><block type=\"Json_JsonValue_stringify\"><value name=\"jsonValue\"><block type=\"Json_toJsonValue\"><value name=\"data\"><block type=\"typescript_expression\"><field name=\"EXPRESSION\">\"'{name\\\":\\\"Hello World\\\", \\\"Number\\\":255}'\"</field></block></value></block></value></block></value></block></statement></block></xml>"}
				
			

The output:

Convert to JsonValue - Output
Next Translating the Text to JsonValue