String jsonMessage =
"[{'num':'成绩','外语':88,'历史':65,'地理':99,'object':{'aaa':1111,'bbb':2222,'ccc':'3333'}},"
+ "{'num':'兴趣','外语':28,'历史':45,'地理':19,'object':{'aaa':1a11,'bbb':2a22,'ccc':'3a33'}},"
+ "{'num':'兴趣','外语':48,'历史':62,'地理':39,'object':{'aaa':1aaa,'bbb':2bb2,'ccc':'3c33'}}]";
JSONArray myJsonArray = JSONArray.fromObject(jsonMessage);
for (int i = 0; i < myJsonArray.size(); i++)
java data注解 integer默认值 java validate注解
一、背景日常开发过程中,经常遇到大量的参数进行校验,在业务中还要抛出异常等校验信息,在代码中相当冗长, 充满了if-else这种校验代码,代码不够优雅,使用spring的javax.validation注解式参数校验,可以免去繁琐的校验。二、@Validated注解单层对象的实体类@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
publi