MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / CheckAllowedJSON

Function CheckAllowedJSON

include/LightGBM/utils/common.h:931–947  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

929}
930
931inline bool CheckAllowedJSON(const std::string& s) {
932 unsigned char char_code;
933 for (auto c : s) {
934 char_code = static_cast<unsigned char>(c);
935 if (char_code == 34 // "
936 || char_code == 44 // ,
937 || char_code == 58 // :
938 || char_code == 91 // [
939 || char_code == 93 // ]
940 || char_code == 123 // {
941 || char_code == 125 // }
942 ) {
943 return false;
944 }
945 }
946 return true;
947}
948
949} // namespace Common
950

Callers 1

set_feature_namesMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected