当前位置:网站首页>[UE4] parse JSON string
[UE4] parse JSON string
2022-07-04 02:39:00 【Mr. Baizi】
API
Reader:
TSharedRef< TJsonReader<> > Reader = TJsonReaderFactory<>::Create(JsonStr);
rRoot:
TSharedPtr rRoot;
String parsing interface
bool bSuccess = FJsonSerializer::Deserialize(Reader, rRoot)
if(bSuccess)
{
int32 value;
// Through this interface Get the corresponding key int32 int64 double value
rRoot->TryGetNumberField(TEXT("key"), value)
// The interface returns double Type value
double value = FJsonObject::GetNumberField("key")
// If key The corresponding is One TArray
const TArray<TSharedPtr<FJsonValue>>* list;
rRoot->TryGetArrayField(TEXT("key"), list)
// And then according to list The actual situation of the neutron term is being analyzed
(*list)[0]->AsObject() // Turn into FJsonObject
(*list)[0]->AsArray() // Turn into TArray
// If key The corresponding is One Json
const TSharedPtr<FJsonObject>*& jsonObject
rRoot->TryGetObjectField(TEXT("key"), jsonObject)
}
边栏推荐
- I stepped on a foundation pit today
- Database concept and installation
- PMP daily three questions (February 14, 2022)
- The "two-way link" of pushing messages helps app quickly realize two-way communication capability
- Basic editing specifications and variables of shell script
- Latex tips slash \backslash
- POSTECH | option compatible reward reverse reinforcement learning
- LV1 previous life archives
- Push technology practice | master these two tuning skills to speed up tidb performance a thousand times!
- Contest3145 - the 37th game of 2021 freshman individual training match_ E: Eat watermelon
猜你喜欢

3D game modeling is in full swing. Are you still confused about the future?

The reasons why QT fails to connect to the database and common solutions

Contest3145 - the 37th game of 2021 freshman individual training match_ 1: Origami

7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages

Dans la recherche de l'intelligence humaine ai, Meta a misé sur l'apprentissage auto - supervisé

I stepped on a foundation pit today

Talking about custom conditions and handling errors in MySQL Foundation

The boss said: whoever wants to use double to define the amount of goods, just pack up and go

Mysql-15 aggregate function

150 ppt! The most complete "fair perception machine learning and data mining" tutorial, Dr. AIST Toshihiro kamishima, Japan
随机推荐
Contest3145 - the 37th game of 2021 freshman individual training match_ D: Ranking
Idea if a class cannot be found, it will be red
STM32 key content
Li Chuang EDA learning notes 13: electrical network for drawing schematic diagram
[untitled]
Mysql-15 aggregate function
ZABBIX API batch delete a template of the host
Mysql to PostgreSQL real-time data synchronization practice sharing
Basé sur... Netcore Development blog Project Starblog - (14) Implementation of theme switching function
Write the first CUDA program
Libcblas appears when installing opencv import CV2 so. 3:cannot open shared object file:NO such file or directory
Global and Chinese market of box seals 2022-2028: Research Report on technology, participants, trends, market size and share
Www 2022 | taxoenrich: self supervised taxonomy complemented by Structural Semantics
Redis transaction
Global and Chinese markets of advanced X-ray inspection system (Axi) in PCB 2022-2028: Research Report on technology, participants, trends, market size and share
Override and virtual of classes in C #
High level application of SQL statements in MySQL database (I)
[Yugong series] February 2022 attack and defense world advanced question misc-83 (QR easy)
Global and Chinese market of handheld melanoma scanners 2022-2028: Research Report on technology, participants, trends, market size and share
Question d: Haffman coding