擅长:python、mysql、java
<p>不是JSON序列化意味着您的响应是一个对象,而不是可以通过网络发送的原始数据。在</p>
<p>您需要为该模型编写序列化程序。像这样:</p>
<pre><code>class AmazonProductSerializer(serializers.Serializer):
color = serializers.CharField()
title = serializers.CharField()
</code></pre>
<p>像这样使用它:</p>
^{pr2}$
<p>希望有帮助!在</p>