Set max file size limit as default parameter for ReadFile
Signed-off-by: srikappa-amzn <srikappa@amazon.com>
This commit is contained in:
@@ -70,7 +70,8 @@ namespace AZ
|
||||
//! Parse json text. Returns a failure with error message if the content is not valid JSON.
|
||||
AZ::Outcome<rapidjson::Document, AZStd::string> ReadJsonString(AZStd::string_view jsonText);
|
||||
|
||||
//! Parse a json file. Returns a failure with error message if the content is not valid JSON.
|
||||
//! Parse a json file. Returns a failure with error message if the content is not valid JSON or if
|
||||
//! the file size is larger than the max file size provided.
|
||||
AZ::Outcome<rapidjson::Document, AZStd::string> ReadJsonFile(
|
||||
AZStd::string_view filePath, size_t maxFileSize = AZStd::numeric_limits<size_t>::max());
|
||||
|
||||
|
||||
@@ -112,6 +112,6 @@ namespace AZ
|
||||
//! the file size is larger than the max file size provided.
|
||||
template<typename Container = AZStd::string>
|
||||
AZ::Outcome<Container, AZStd::string> ReadFile(
|
||||
AZStd::string_view filePath, size_t maxFileSize);
|
||||
AZStd::string_view filePath, size_t maxFileSize = AZStd::numeric_limits<size_t>::max());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user