Hi, we’ve encountered an issue about property’s name in JsonObjectString, the situation is:
We have a UPROPERTY which’s type is FString named GUID.
If I launch UE4 Server from Editor and then the property’s name in JsonObjectString is “gUId”, but if I launch UE4 Server from a packaged server then it will be “guid”.
Ah right, sorry then, I’ve got no more ideas. You’ll have to wait for someone with more xp at this which, unfortunately, is usually a very long time (if at all). Its a pity, but the community here is not very active - I suspect that it is because ue4 has not been around for as long as some others. Good luck!
Nope, It’s a native C++ UPROPERTY in USTRUCT, And I called jsonconverter api in native C++ as well without blueprint. And the original name is “FString GUID”.
Inside JsonObjectConverter.cpp, the first function reads:
FString FJsonObjectConverter::StandardizeCase(const FString &StringIn)
{
// this probably won't work for all cases, consider downcaseing the string fully
FString FixedString = StringIn;
FixedString[0] = FChar::ToLower(FixedString[0]); // our json classes/variable start lower case
FixedString.ReplaceInline(TEXT("ID"), TEXT("Id"), ESearchCase::CaseSensitive); // Id is standard instead of ID, some of our fnames use ID
return FixedString;
}
So, the logic seems to convert the first character to lowercase, and replace any ‘ID’ to 'Id", so “GUID” will be converted like this:
“GUID” ==> “gUID”
“gUID” ==> “gUId”
But as to why in the packaged game “GUID” becomes “guid”, I have no idea
We have not heard from you in several days. I am marking this thread as answered for tracking purposes. If you are still experiencing this issue, please comment with the requested information.