Home > Back-end > FastJson json string into JSONObject, how to retain the value to null field
FastJson json string into JSONObject, how to retain the value to null field
Time:09-27
As title, FastJson USES are not ripe, the following is a piece of code, resultStr is a json string, which contain null fields, converted to is not the null field after JSONObject, how can I keep? JSONObject JSONObject=JSON. ParseObject (resultStr); I this is not converted to encapsulate good class object, because resultStr structure is uncertain, so are USES JSONObject to operation! How to put it bluntly, is to convert the JSONObject retains the null fields, beg god for help to see see!
CodePudding user response:
ParseObject) allowing one preach a ParseProcess interface implementation as parameters, the interface has a subinterface call ExtraProcessor, it defines a method called processExtra, there are three parameters is object, the key and the value... The rest you know
CodePudding user response:
Also hope to express! I also encountered this problem! Only know fastjson weex framework, the processExtra. How to solve the JSON parse (strJson); The method to filter out the null field?
CodePudding user response:
1/f, don't meet the requirements of the building Lord I also encountered this problem, the building Lord solved excuse me
CodePudding user response:
I also encountered this problem, the building Lord solved excuse me