API
Reader: TSharedRef< TJsonReader<> > Reader = TJsonReaderFactory<>::Create(JsonStr); rRoot: TSharedPtr rRoot;
字符串解析接口 bool bSuccess = FJsonSerializer::Deserialize(Reader, rRoot)
if(bSuccess)
{
int32 value;
rRoot->TryGetNumberField(TEXT("key"), value)
double value = FJsonObject::GetNumberField("key")
const TArray<TSharedPtr<FJsonValue>>* list;
rRoot->TryGetArrayField(TEXT("key"), list)
(*list)[0]->AsObject()
(*list)[0]->AsArray()
const TSharedPtr<FJsonObject>*& jsonObject
rRoot->TryGetObjectField(TEXT("key"), jsonObject)
}
|