// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "Policies/JsonPrintPolicy.h" /** * Template for print policies that generate human readable output. * * @param CharType The type of characters to print, i.e. TCHAR or ANSICHAR. */ template struct TPrettyJsonPrintPolicy : public TJsonPrintPolicy { static inline void WriteLineTerminator( FArchive* Stream ) { TJsonPrintPolicy::WriteString(Stream, FStringView(LINE_TERMINATOR)); } static inline void WriteTabs( FArchive* Stream, int32 Count ) { CharType Tab = CharType('\t'); for (int32 i = 0; i < Count; ++i) { TJsonPrintPolicy::WriteChar(Stream, Tab); } } static inline void WriteSpace( FArchive* Stream ) { TJsonPrintPolicy::WriteChar(Stream, CharType(' ')); } };