[INFO ] 2015-09-23 11:22:06,691 [threadPoolTaskExecutor-41] com.sto.pdaplatform.module.rediscommon.core.ParseObjectFactory.getParseObjFactory(ParseObjectFactory.java:27) >>> the original data is :{"inTime":"2015-09-23 11:
25:58","cnt":"1","opRecord":[{"effectiveType":"","expType":"10","frequencyNo":"","goodsType":"","inputWeight":"","lastOrgCode":"","waybillNo":"768999995555","weight":"","auxOpCode":"NEW","clientProgramRole":"0","deviceType":"PDA","opCod
e":"520","opOrgCode":"900000","opTerminal":"150100180220789","opTime":"2015-09-23 11:25:54","opUserCode":"9000000615","pdaUuid":"12293d94dd26409db4c370fa3e47c07c"}],"org":"900000","mty":"0520","sessionId":"081f9b6d0051409da81009db0eb397
0d","tid":"150100180220789","trace":"923000063"} ]]
这是读取的一行的记录 ,然后想让读取的时候从the original data is :冒号后面开始读取,只要json串。
目前代码。
先用indexof找到下标,然后substring,取需要的子串
找到"the original data is :"所在的位置(indexof),然后往后提取就可以
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。