package com.huimv.video.dhicc.service;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * @Project : huimv.shiwan
 * @Package : com.huimv.biosafety.uface.controller
 * @Description : TODO
 * @Version : 1.0
 * @Author : ZhuoNing
 * @Create : 2020-12-25
 **/
@SpringBootTest
public class ClientAllEventServiceImplTest {

    @Test
    public void testPasrse(){
        String text = "IccResponse{result='{\"success\":true,\"code\":\"0\",\"errMsg\":\"success\",\"data\":104}', requestId='null', code='0', success=true, errMsg='success'}";
        System.out.println("text 1>>"+text);
        text = text.substring(text.indexOf("data"),text.length());
//        System.out.println("text 2>>"+text);
        text = text.substring(text.indexOf(":")+1,text.indexOf("}"));
        System.out.println("text 3>>"+text);
//        text = text.substring(0,text.length()-1);
//        System.out.println("text 3>>"+text);

//        JSONObject dataJo = JSON.parseObject(text);
//        System.out.println("dataJo>>"+dataJo);

    }
}
