{“ requestBody”:“ {\ r \ n \” ProcedureCode \“:\” RT \“,\ r \ n \” ProcedureVersion \“:1,\ r \ n \” FacilityGlobalID \“:\” \“,\ r \ n \” FacilityID \“:\” \“,\ r \ n \” FacilityType \“:\” \“,\ r \ n \” SurveyAreaID \“:\” RTSURVEY1 \“,\ r \ n \“ SurveyAreaType \”:\“ FDR27KV \”,\ r \ n \“ ProcedureSteps \”:[{\ r \ n \“ ProcedureStepUniquelD \”:\“ 10349 \”,\ r \ n \“ ProcedureStepID \“:\” \“,\ r \ n \” DeleteStep \“:\” \“,\ r \ n \” StepCode \“:\” RTSTEPS \“,\ r \ n \” StepDescription \“:\ “ TEST \”,\ r \ n \“ StepActualDateTime \”:\“ 2018-06-06T09:15:31.176Z \”,\ r \ n \“ StepCompletionDateTime \”:\“ 2018-06-06T09:15: 31.176Z \“,\ r \ n \” StepCompletedByPersonNumber \“:16,\ r \ n \” StepCompletedByEmail \“:\” \“,\ r \ n \” StepCompletedByCoEmployeeID \“:\” \“,\ r \ n \“ CrewID \”:\“ 3982 \”,\ r \ n \“ Comment \”:\“测试评论\”,\ r \ n \“ Instruction \”:\“ \”,\ r \ n \ “ StepAction \”:\“ \”,\ r \ n \“ RepetitionSequence \”:null,\ r \ n \“ ReportName \”:\“ TEST \”,\ r \ n \“ SpatialID \”:null, \ r \ n \“ SpatialX \”:0,\ r \ n \“ Spati alY \“:0,\ r \ n \” ProcedureStepGroupUniqueID \“:\” \“,\ r \ n \” InsertionDate \“:\” 2018-06-06 \“,\ r \ n \” FacilityGlobalID \“ :\“ \”,\ r \ n \“ FacilityID \”:\“ RTFAC1 \”,\ r \ n \“ FacilityType \”:\“ POLE \”,\ r \ n \“ ComponentGlobalID \”:\“ \“,\ r \ n \” ComponentID \“:\” \“,\ r \ n \” ComponentType \“:\” \“,\ r \ n \” AssetSequenceNumber \“:0,\ r \ n \ “ ProcedureStepResults \”:[{\ r \ n \“ Result \”:\“ 115 \”,\ r \ n \“ ResultDescription \”:\“ \” \ r \ n}],\ r \ n \“ ProcedureStepFollowupWorkRequests \“:[{\\ r \ n \” FollowupWorkRequestGlobalID \“:\” 1234 \“,\ r \ n \” FollowUpWorkRequestNumberType \“:\” WMIS \“,\ r \ n \” ResultCode \“:\” \“ \ r \ n}] \ r \ n}],\ r \ n \” Conditions \“:[{\ r \ n \” ConditionGlobalID \“:\” \“,\ r \ n \” ConditionID \ “:\” 1966 \“,\ r \ n \” NewCondition \“:\” N \“,\ r \ n \” ConditionName \“:\” \“,\ r \ n \” ConditionStatus \“:\ “ \”,\ r \ n \“删除\”:\“ \”,\ r \ n \“ EnteredDateTime \”:\“ 2018-06-05T09:15:31.177Z \”,\ r \ n \“ DateTimeOpened \“:\” 2018-06-05T 09:15:31.177Z \“,\ r \ n \” DateTimeClosed \“:空,\ r \ n \” OpenedByPersonNumber \“:空,\ r \ n \” OpenedByEmail \“:\” sunitha \“,\ r \ n \“ EnteredByPersonNumber \”:空,\ r \ n \“ EnteredByPersonEmail \”:\“ sunitha \”,\ r \ n \“ ClosedByPersonNumber \”:空,\ r \ n \“ ClosedByPersonEmail \”:\ “ sunitha.subash。\”,\ r \ n \“ SurveyAreaID \”:\“ \”,\ r \ n \“ SurveyAreaType \”:\“ \”,\ r \ n \“ FacilityGlobalID \”:\“ \“,\ r \ n \” FacilityID \“:\” \“,\ r \ n \” FacilityType \“:\” \“,\ r \ n \” ComponentGlobalID \“:\” \“,\ r \ n,\ r \ n \“ Address13 \”:\“ \”,\ r \ n \“ Address14 \”:\“ \”,\ r \ n \“ Address15 \”:\“ \”,\ r \ n \“ SpatialD \”:\“ \”,\ r \ n \“ SpatialX \”:\“ 0 \”,\ r \ n \“ SpatialY \”:\“ 0 \”,\ r \ n \ “ ConditionDetail \”:[{\\ r \ n \“ ConditionDetailGlobalID \”:\“ \”,\ r \ n \“ Action \”:\“ \”,\ r \ n \“ ActionDescription \”:\“ \ “,\ r \ n \”评论\“:\” \“,\ r \ n \” CreditProcedure \“:\” \“,\ r \ n \” CrewCode \“:\” \“,\ r \ n \“结果\”:\“ \”,\ r \ n \“结果描述\”: \“ \”,\ r \ n \“ ConditionType \”:\“ CI003 \”,\ r \ n \“ UpdateDateTime \”:\“ 2018-06-06T09:15:31.178Z \”,\ r \ n \“ UpdatedByPersonNumber \”:空,\ r \ n \“ UpdatedByEmail \”:\“ sunitha.subash.chandra.bose @ .com \”,\ r \ n \“ UpdatedByCoEmployeeID \”:\“ \”,\ r \ n \“ FollowUpWorkRequestType \”:\“ \”,\ r \ n \“ FollowupWorkRequestGlobalID \”:\“ \”,\ r \ n \“ ConditionDetailAttributes \”:[{\ r \ n \“ AttributeCode \”: \“ CFR \”,\ r \ n \“ AttributeValue \”:\“否\”,\ r \ n \“复制\”:\“ \”,\ r \ n \“ UpdateableAfterCopy \”:\“ N \“ \ r \ n}] \ r \ n}],\ r \ n \” ConditionAttachments \“:[{\ r \ n \” FileName \“:\” TEST.TXT \“,\ r \ n \ “ PathName \”:\“ \”,\ r \ n \“ AttachmentDescription \”:\“ \”,\ r \ n \“ Comments \”:\“ \”,\ r \ n \“ AttachmentDateTime \”: null,\ r \ n \“ AttachedByPersonNumber \”:16,\ r \ n \“ AttachedByPersonEmail \”:\“ \”,\ r \ n \“ AttachedByPersonCoEmployeeID \”:\“ \”,\ r \ n \“ AttachedByPersonGenID \“:\” \“ \ r \ n}] \ r \ n}],\ r \ n \” SurveyedFacilities \“:[{\\ r \ n \” FacilityGlobalId \“:\” \“,\ r \ n \” FacilityType \“:\” POLE \“,\ r \ n \” FacilityID \“:\” RTFAC1 \“,\ r \ n \” DateSurveyed \“:\” 2018-06-06T09:15:31.178Z \“,\ r \ n \” SurveyedByPersonNumber \“:16,\ r \ n \” SurveyedByEmail \“: \“ \”,\ r \ n \“ SurveyedByCoEmployeeID \”:\“ \”,\ r \ n \“ ModifiedByPersonNumber \”:16,\ r \ n \“ UpdateTimestamp \”:null,\ r \ n \“ SurveyedFacilityConditions \“:[{\ r \ n \” ConditionGlobalID \“:\” \“,\ r \ n \” ConditionID \“:\” 1966 \“ \ r \ n}] \ r \ n}] \ r \ n}“,” requestURL“:” http://131:9082/Server/work/id/~2414/results“,” requestHeader“:” {\“ RequestDateTime \”:\“ 2018-03-21T10:29:52Z \”,\“ VendorName \”:\ “ Vendor101 \”,\“ AppName \”:\“ WM \”,\“ UserID \”:\“ IT1 \”,\“ ServiceDetails \”:\“ iOS | 11.2.6 | Cell \”,\“ ReportingCrewID \“:\” Crew101 \“,\” ReportingPersonNumber \“:12345,\” ReportingPersonEmail \“:\” person1@domain.com \“}”}
这是我的样本杰森。它在JsonArray中具有复杂的JsonObjects和JSONarray。
用户将基于此json从UI更新n个键值。
例如: 可以从UI更新requestBody中的ProcedureCode键 可以从UI更新ProcedureSteps(位于requestBody内部)中的ProcedureStepUniquelD。
我需要更新上述json并形成与上述相同的结构,并使用uodated密钥保存到数据库中。
请注意,示例json是动态的。不能与上面给出的相同。
请让我知道如何在没有pojo类的情况下以相同格式更新json。