Using custom JSONCONVERTER converters
Implement
Standard CustomCreationConverter is not enough to complete this task because it cannot determine the correct type based on JSON object analysis. On the contrary, we need:Create an abstract Create method, which accepts a jobject (representing JSON object).
Create method and pass in jobject.
Return to the corresponding type of instance.
The above is the detailed content of How to Deserialize Polymorphic JSON Data into a List of Base Classes using a Custom JsonConverter?. For more information, please follow other related articles on the PHP Chinese website!