Demo

package com.ecshopping.jee.modules.system.wxpc.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

public class Test {
	public static void main(String[] args){
		String result="{\"payOrderId\":\"EPP10320190820709190\",\"subOrderId\":null,\"resultCode\":\"0000\",\"sign\":\"bwVmGWv0q_7HRtbE\",\"merchantOrderId\":\"7000001393\",\"resultMsg\":\"受理成功\"}";
		
		// 字符串转换为JSON
		JSONObject jsonObject = JSON.parseObject(result);	// result数据源:JSON格式字符串
		// 获取值
		String s = jsonObject.getString("resultMsg");
		
		System.out.println(s);

	}
}

结果

java获取json java获取json字符串的属性值_字符串