当前位置:网站首页>[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)
}
边栏推荐
- LV1 previous life archives
- Override and virtual of classes in C #
- Key knowledge of embedded driver
- Amélioration de l'efficacité de la requête 10 fois! 3 solutions d'optimisation pour résoudre le problème de pagination profonde MySQL
- Portapack application development tutorial (XVII) nRF24L01 launch C
- C # learning notes: structure of CS documents
- Take you to master the formatter of visual studio code
- Li Chuang EDA learning notes IX: layers
- Question C: Huffman tree
- LV1 Roche limit
猜你喜欢

Li Chuang EDA learning notes 13: electrical network for drawing schematic diagram

There is no need to authorize the automatic dream weaving collection plug-in for dream weaving collection

150 ppt! The most complete "fair perception machine learning and data mining" tutorial, Dr. AIST Toshihiro kamishima, Japan

MySQL advanced (Advanced) SQL statement (I)

When tidb meets Flink: tidb efficiently enters the lake "new play" | tilaker team interview

Advanced learning of MySQL -- Application -- storage engine

Pytoch residual network RESNET

WordPress collection WordPress hang up collection plug-in

Lichuang EDA learning notes 14: PCB board canvas settings

長文綜述:大腦中的熵、自由能、對稱性和動力學
随机推荐
Key knowledge of embedded driver
Neo4j learning notes
[untitled]
基於.NetCore開發博客項目 StarBlog - (14) 實現主題切換功能
Properties of binary trees (numerical aspects)
LV1 previous life archives
Crawler practice website image batch download
[untitled] the relationship between the metauniverse and digital collections
Introduction to graphics: graphic painting (I)
A. Div. 7
What are the main investment products of bond funds and what are they
In yolov5, denselayer is used to replace focus, and the FPN structure is changed to bi FPN
Question C: Huffman tree
FRP intranet penetration
Basic editing specifications and variables of shell script
ZABBIX API batch delete a template of the host
How to subcontract uniapp and applet, detailed steps (illustration) # yyds dry goods inventory #
Database concept and installation
Advanced learning of MySQL -- Application -- storage engine
I stepped on a foundation pit today