diff --git a/api-test/backend/src/main/java/io/metersphere/service/ShareInfoService.java b/api-test/backend/src/main/java/io/metersphere/service/ShareInfoService.java index 2ba582a292..ec9a9089c7 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/ShareInfoService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/ShareInfoService.java @@ -277,7 +277,7 @@ public class ShareInfoService extends BaseShareInfoService { if (isJsonSchema) { jsonSchemaBodyDTO.setJsonSchema(bodyObj.get("jsonSchema")); apiInfoDTO.setJsonSchemaBody(jsonSchemaBodyDTO); - String raw = JSONSchemaGenerator.getJson(bodyObj.get("jsonSchema").toString()); + String raw = JSONSchemaGenerator.getJson(bodyObj.get("jsonSchema").asText()); this.setPreviewData(previewJsonArray, raw); } else { if (bodyObj.has("raw")) {