Documentation

Una is developed by Una Technologies Limited

All rights reserved

© 2022 Una Technologies Limited

Print

Translating the Text to JsonValue

Convert the content of string to JsonValue

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"Json_parse\" disabled=\"true\" x=\"-22\" y=\"157\"><value name=\"str\"><shadow type=\"text\" disabled=\"true\"><field name=\"TEXT\"/></shadow></value></block></xml>"}
				
			

This is used to convent the String to JsonValue.

Parameters: String

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_parse\"><value name=\"str\"><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 the Content of String to JsonValue - Output
Previous Translating the Screen Item to JsonValue