{"comment":{"url":"https://api.github.com/repos/MuXiaoCao/XCParse/comments/18332705","html_url":"https://github.com/MuXiaoCao/XCParse/commit/0b73c35439fc6c39d78c7f1a1fc03e14c94a88e7#commitcomment-18332705","id":18332705,"user":{"login":"MuXiaoCao","id":16450749,"avatar_url":"https://avatars.githubusercontent.com/u/16450749?v=3","gravatar_id":"","url":"https://api.github.com/users/MuXiaoCao","html_url":"https://github.com/MuXiaoCao","followers_url":"https://api.github.com/users/MuXiaoCao/followers","following_url":"https://api.github.com/users/MuXiaoCao/following{/other_user}","gists_url":"https://api.github.com/users/MuXiaoCao/gists{/gist_id}","starred_url":"https://api.github.com/users/MuXiaoCao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MuXiaoCao/subscriptions","organizations_url":"https://api.github.com/users/MuXiaoCao/orgs","repos_url":"https://api.github.com/users/MuXiaoCao/repos","events_url":"https://api.github.com/users/MuXiaoCao/events{/privacy}","received_events_url":"https://api.github.com/users/MuXiaoCao/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":null,"commit_id":"0b73c35439fc6c39d78c7f1a1fc03e14c94a88e7","created_at":"2016-07-21T04:29:47Z","updated_at":"2016-07-21T04:29:47Z","body":"# XCParse\r\n小草解析开源框架\r\n\r\n##使用场景：\r\n\t解析从文本文件中的读取的内容，转化为javaBean对象。\r\n\t例如：需要将字符串“12，xiaocao”解析成有name和age属性的java对象。\r\n\r\n示例代码：\r\n\t\r\n```\r\n\tString parseString = \"25,muxiaocao\";\r\n\r\n\tRecordParserImpl<Bean> parser = new RecordParserImpl<Bean>(Bean.class);\r\n\r\n\tBean person = parser.parse(parseString, \",\",null);\r\n```\r\n如果希望将muxiaocao改成xiaocao：\r\n```\r\n\tString parseString = \"25,muxiaocao\";\r\n\tRecordParserImpl<Bean> parser = new RecordParserImpl<Bean>(Bean.class);\r\n\tBean person = parser.parse(parseString, \",\",new CallBack() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic String DataDeal(int itemId, String data) {\r\n\t\t\t\tif (data.equals(\"muxiaocao\")) {\r\n\t\t\t\t\treturn \"xiaocao\";\r\n\t\t\t\t}else {\r\n\t\t\t\t\treturn data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t});\r\n```"}}
{"actor":{"display_login":"MuXiaoCao"}}