The ParseJSON function is now GA, so I looked up how to use it.
- ParseJSON function/h2> The ParseJSON function converts (parses) text in JSON format into data that can be used in Power Apps. Click here for the official ParseJSON function - Power PlatformReference information including syntax and examples for the ParseJSON function.learn.microsoft.com JSON is a data format that can represent a variety of information in a single text, and is used for various purposes such as API return values and CosmosDB. Here is a JSON representation of our cat’s information. { "Age": 3, "Name": "こつぶ", "Species": "スコティッシュフォールド", "VaccinationHistory": [ { "date": "2023-06-01", "name": "3種混合" }, { "date": "2022-06-01", "name": "3種混合" }, { "date": "2021-06-01", "name": "3種混合" } ] } Untyped object
- Parse JSON returned by HTTP request with Power Apps
ParseJSON function/h2> The ParseJSON function converts (parses) text in JSON format into data that can be used in Power Apps. Click here for the official ParseJSON function - Power PlatformReference information including syntax and examples for the ParseJSON function.learn.microsoft.com JSON is a data format that can represent a variety of information in a single text, and is used for various purposes such as API return values and CosmosDB. Here is a JSON representation of our cat’s information. { "Age": 3, "Name": "こつぶ", "Species": "スコティッシュフォールド", "VaccinationHistory": [ { "date": "2023-06-01", "name": "3種混合" }, { "date": "2022-06-01", "name": "3種混合" }, { "date": "2021-06-01", "name": "3種混合" } ] } Untyped object
The ParseJSON function returns data of type “Untyped object” as the return value.
Untyped object is a data type that contains data that the Power Apps side cannot determine what kind of data type it is.
So, the value obtained by ParseJSON must be converted to the Power Apps data type using a function to make it usable,
So, the values obtained with ParseJSON were supposed to be usable without converting them to Power Apps data types using functions, but it seems that simple data such as strings and numbers can now be inferred and used on the Power Apps side.
*I’m pretty sure you couldn’t do that during the preview.
However, it is more helpful to the code reader if you call the conversion functions properly, so we will introduce a few typical conversion functions.
コメント