You can use tools, such as Alibaba's fastjson, to first format the string into json format (intercept and split it), and then get the value through the key
The non-standard method is to use "," to split the string, and then use "=" to split it. The first part is the key and the last part is the value. Then you can store it as a map or other methods.
You can use tools, such as Alibaba's fastjson, to first format the string into json format (intercept and split it), and then get the value through the key
1. The string in java should be defined this way: String stats="[id=1,mid=2]";
2. What value do you want to take? The description is not clear
The non-standard method is to use "," to split the string, and then use "=" to split it. The first part is the key and the last part is the value. Then you can store it as a map or other methods.