[英]how to convert list of complex object and represent it in values yaml chart
[英]how to represent a list of entity values in JSON object
我有一個實體類型的記錄列表,我對如何在列明智的列表中表示每個記錄或將每個記錄表示為json
對象的方式感到困惑,這意味着JSON
對象的列表。
::說明::
這里firstName
, secondName
和thirdName
是column names
。 需要以這種格式表示
__ {{firstName:Rec1,secondName:Rec1,thirdName:Rec1},{firstName:Rec2,secondName:Rec2,thirdName:Rec2}...n}__
但是我走近
_ _{firstName:[Rec1,Rec2,Rec3...],secondName:[Rec1,Rec2,Rec3...],thirdName:[Rec1,Rec2,Rec3...]},__
當我嘗試通過實體類型時,它表示像
__{"ServiceData":[com.aiway.eea.ejb.to.student.ParentStudentDetailsTO@8b0db2,com.aiway.eea.ejb.to.student.ParentStudentDetailsTO@1304967]}__
請幫我解決這個問題...
我們無法將其作為實體類型傳遞,我們需要Transfer Object將實體從ENTITY轉換為JSON對象,如果List entityType表示然后使用List JSONObject ,然后將該JsonObject列表放入另一個Json對象,例如<“ serviceData”:JsonObject>它將像{“ ServiceData”:[{“ parentId”:4009,“ parentRelation”:“父親”,“ parentNotification”:false,“ parentOccupation”:“ bussiness”,“ parentEducation” : “MBA”, “parentName”: “塔魯N”},{ “parentId的”:4010, “parentRelation”: “M其他”, “parentNotifi陽離子”:假“括號tOccupation”: “sdfsdf”, “parentEducation”: “sdfsdfs”, “parentNam E”: “rakshitha”}]}
使用此鏈接了解JSON數組https://www.w3schools.com/js/js_json_arrays.asp
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.