MXAvroLogValidate 0.1.0

MXAvroLogValidate 0.1.0

Maintained by Max.



  • By
  • 何可

MXAvroLogValidate

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

MXAvroLogValidate is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'MXAvroLogValidate'

##Usage

NSArray *schemas = @[@"BaseLog",
                         @"CreateHotelOrder",
                         @"SubmitCarOrder",
                         @"CarOrder",
                         @"EventType",
                         @"SubmitHotelOrder",
                         @"Client",
                         @"HotelOrder",
                         @"UserInfo",
                         @"CreateCarOrder",
                         @"Order"];
    [MXAvroLogValidator configWithRootSchema:@"BaseLog" subSchemas:schemas];
    NSDictionary *dic = jsonObject;
    [dic validateAvroLogWith:^(BOOL validateResult, NSDictionary * _Nonnull invalidatePathDic) {
        if (!validateResult) {
            NSLog(@"校验失败:%@",invalidatePathDic);
        }else {
            NSLog(@"校验成功");
        }
    }];

Author

xuvw, [email protected]

License

MXAvroLogValidate is available under the MIT license. See the LICENSE file for more info.