| 826 | } |
| 827 | |
| 828 | bool EndObject(Context& context, SizeType memberCount) const { |
| 829 | if (hasRequired_) |
| 830 | for (SizeType index = 0; index < propertyCount_; index++) |
| 831 | if (properties_[index].required) |
| 832 | if (!context.propertyExist[index]) |
| 833 | RAPIDJSON_INVALID_KEYWORD_RETURN(GetRequiredString()); |
| 834 | |
| 835 | if (memberCount < minProperties_) |
| 836 | RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinPropertiesString()); |
| 837 | |
| 838 | if (memberCount > maxProperties_) |
| 839 | RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaxPropertiesString()); |
| 840 | |
| 841 | if (hasDependencies_) { |
| 842 | for (SizeType sourceIndex = 0; sourceIndex < propertyCount_; sourceIndex++) |
| 843 | if (context.propertyExist[sourceIndex]) { |
| 844 | if (properties_[sourceIndex].dependencies) { |
| 845 | for (SizeType targetIndex = 0; targetIndex < propertyCount_; targetIndex++) |
| 846 | if (properties_[sourceIndex].dependencies[targetIndex] && !context.propertyExist[targetIndex]) |
| 847 | RAPIDJSON_INVALID_KEYWORD_RETURN(GetDependenciesString()); |
| 848 | } |
| 849 | else if (properties_[sourceIndex].dependenciesSchema) |
| 850 | if (!context.validators[properties_[sourceIndex].dependenciesValidatorIndex]->IsValid()) |
| 851 | RAPIDJSON_INVALID_KEYWORD_RETURN(GetDependenciesString()); |
| 852 | } |
| 853 | } |
| 854 | |
| 855 | return true; |
| 856 | } |
| 857 | |
| 858 | bool StartArray(Context& context) const { |
| 859 | if (!(type_ & (1 << kArraySchemaType))) |