<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cast dropbox class to JSON in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cast-dropbox-class-to-JSON/m-p/559372#M26426</link>
    <description>&lt;P&gt;I am using the Python Dropbox package to pull team events:&lt;/P&gt;&lt;P&gt;```&lt;BR /&gt;dbx = dropbox.DropboxTeam(self.access_token)&lt;BR /&gt;result = dbx.team_log_get_events()&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;I need to pass the value of `result` along as a JSON object. When I try using `json.dumps(result)`, I get this error:&lt;BR /&gt;&amp;gt; TypeError: Object of type GetTeamEventsResult is not JSON serializable&lt;/P&gt;&lt;P&gt;Is there a way to cast to json/dict with the Dropbox package?&lt;/P&gt;&lt;P&gt;My other potential solutions would be to write my own method to cast it (seems tedious) or just make API calls instead of using the package.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Nov 2021 14:34:39 GMT</pubDate>
    <dc:creator>rgahan</dc:creator>
    <dc:date>2021-11-22T14:34:39Z</dc:date>
    <item>
      <title>Cast dropbox class to JSON</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cast-dropbox-class-to-JSON/m-p/559372#M26426</link>
      <description>&lt;P&gt;I am using the Python Dropbox package to pull team events:&lt;/P&gt;&lt;P&gt;```&lt;BR /&gt;dbx = dropbox.DropboxTeam(self.access_token)&lt;BR /&gt;result = dbx.team_log_get_events()&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;I need to pass the value of `result` along as a JSON object. When I try using `json.dumps(result)`, I get this error:&lt;BR /&gt;&amp;gt; TypeError: Object of type GetTeamEventsResult is not JSON serializable&lt;/P&gt;&lt;P&gt;Is there a way to cast to json/dict with the Dropbox package?&lt;/P&gt;&lt;P&gt;My other potential solutions would be to write my own method to cast it (seems tedious) or just make API calls instead of using the package.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 14:34:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cast-dropbox-class-to-JSON/m-p/559372#M26426</guid>
      <dc:creator>rgahan</dc:creator>
      <dc:date>2021-11-22T14:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Cast dropbox class to JSON</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cast-dropbox-class-to-JSON/m-p/559449#M26428</link>
      <description>&lt;P&gt;[Cross-linking for reference: &lt;A href="https://stackoverflow.com/questions/70041701/cast-dropbox-class-to-json" target="_self"&gt;https://stackoverflow.com/questions/70041701/cast-dropbox-class-to-json&lt;/A&gt; ]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The methods for calling the API in the Dropbox Python SDK don't return JSON-serializable objects (or the original JSON from the server), but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can transform the information in the returned native object however you wish, but you'd need to write the code to do so though unfortunately, as you mentioned.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 15:44:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cast-dropbox-class-to-JSON/m-p/559449#M26428</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-11-22T15:44:54Z</dc:date>
    </item>
  </channel>
</rss>

