FJsonObjectConverter::UStructToJsonObjectString avoid changing case

The function FJsonObjectConverter::UStructToJsonObjectString is changing the case of UPROPERTY items.
Is there a way to block it.

/**
 * @brief The struct used to create the json parameters
 * 		  for the http request
 * @remark The case is changed by the UE FJsonObjectConverter::UStructToJsonObjectString function
 */
USTRUCT()
struct FKJsonParamUserId
{
	GENERATED_USTRUCT_BODY()

	UPROPERTY()
		FString userid;

	UPROPERTY()
		FString clientid;

	UPROPERTY()
		int32 servertype;

	// constructor
	FKJsonParamUserId(const FString& InUserId = TEXT(""), const FString& InClientId = TEXT(""), const int32 InServerType = 0)
	{
		userid = InUserId;
		clientid = InClientId;
		servertype = InServerType;
	}
};




	FString OutputString;
	TUniquePtr<FKJsonParamUserId> param = TUniquePtr<FKJsonParamUserId>(new FKJsonParamUserId(GetOnlineUniquePlayerId(), FKHttpServerManager::Get()->GetClientId(), FKHttpServerManager::Get()->GetServerType()));
	if (FJsonObjectConverter::UStructToJsonObjectString(FKJsonParamUserId::StaticStruct(), param.Get(), OutputString, 0, 0, 0, nullptr, false))
	{

The field are changed as :

‘clientId’;
‘serverType’;
‘userid’;

It will be great to have an additional parameter to force the system to change or not the case.

D.

1 Like