• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="ascii"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3          "DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6  <title>googleapiclient.model.JsonModel</title>
7  <link rel="stylesheet" href="epydoc.css" type="text/css" />
8  <script type="text/javascript" src="epydoc.js"></script>
9</head>
10
11<body bgcolor="white" text="black" link="blue" vlink="#204080"
12      alink="#204080">
13<!-- ==================== NAVIGATION BAR ==================== -->
14<table class="navbar" border="0" width="100%" cellpadding="0"
15       bgcolor="#a0c0ff" cellspacing="0">
16  <tr valign="middle">
17  <!-- Home link -->
18      <th>&nbsp;&nbsp;&nbsp;<a
19        href="googleapiclient-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
20
21  <!-- Tree link -->
22      <th>&nbsp;&nbsp;&nbsp;<a
23        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
24
25  <!-- Index link -->
26      <th>&nbsp;&nbsp;&nbsp;<a
27        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
28
29  <!-- Help link -->
30      <th>&nbsp;&nbsp;&nbsp;<a
31        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
32
33      <th class="navbar" width="100%"></th>
34  </tr>
35</table>
36<table width="100%" cellpadding="0" cellspacing="0">
37  <tr valign="top">
38    <td width="100%">
39      <span class="breadcrumbs">
40        <a href="googleapiclient-module.html">Package&nbsp;googleapiclient</a> ::
41        <a href="googleapiclient.model-module.html">Module&nbsp;model</a> ::
42        Class&nbsp;JsonModel
43      </span>
44    </td>
45    <td>
46      <table cellpadding="0" cellspacing="0">
47        <!-- hide/show private -->
48        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
49    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
50        <tr><td align="right"><span class="options"
51            >[<a href="frames.html" target="_top">frames</a
52            >]&nbsp;|&nbsp;<a href="googleapiclient.model.JsonModel-class.html"
53            target="_top">no&nbsp;frames</a>]</span></td></tr>
54      </table>
55    </td>
56  </tr>
57</table>
58<!-- ==================== CLASS DESCRIPTION ==================== -->
59<h1 class="epydoc">Class JsonModel</h1><p class="nomargin-top"><span class="codelink"><a href="googleapiclient.model-pysrc.html#JsonModel">source&nbsp;code</a></span></p>
60<center>
61<center>  <map id="uml_class_diagram_for_googleap_39" name="uml_class_diagram_for_googleap_39">
62<area shape="rect" id="node1_9" href="googleapiclient.model.JsonModel-class.html#accept" title="googleapiclient.model.JsonModel.accept" alt="" coords="103,189,309,209"/>
63<area shape="rect" id="node1_10" href="googleapiclient.model.JsonModel-class.html#content_type" title="googleapiclient.model.JsonModel.content_type" alt="" coords="103,209,309,229"/>
64<area shape="rect" id="node1_11" href="googleapiclient.model.JsonModel-class.html#alt_param" title="googleapiclient.model.JsonModel.alt_param" alt="" coords="103,229,309,249"/>
65<area shape="rect" id="node1_12" href="googleapiclient.model.JsonModel-class.html#__init__" title="Construct a JsonModel." alt="" coords="103,252,309,272"/>
66<area shape="rect" id="node1_13" href="googleapiclient.model.JsonModel-class.html#serialize" title="Perform the actual Python object serialization." alt="" coords="103,272,309,292"/>
67<area shape="rect" id="node1_14" href="googleapiclient.model.JsonModel-class.html#deserialize" title="Perform the actual deserialization from response string to Python object." alt="" coords="103,292,309,312"/>
68<area shape="rect" id="node1_15" href="googleapiclient.model.JsonModel-class.html#no_content_response" title="googleapiclient.model.JsonModel.no_content_response" alt="" coords="103,312,309,332"/>
69<area shape="rect" id="node1" href="googleapiclient.model.JsonModel-class.html" title="Model class for JSON." alt="" coords="90,165,321,339"/>
70<area shape="rect" id="node2_16" href="googleapiclient.model.BaseModel-class.html#request" title="Updates outgoing requests with a serialized body." alt="" coords="17,101,396,121"/>
71<area shape="rect" id="node2_17" href="googleapiclient.model.BaseModel-class.html#response" title="Convert the response wire format into a Python object." alt="" coords="17,121,396,141"/>
72<area shape="rect" id="node2" href="googleapiclient.model.BaseModel-class.html" title="Base model class." alt="" coords="5,68,408,147"/>
73<area shape="rect" id="node3" href="googleapiclient.model.Model-class.html" title="Model base class." alt="" coords="175,5,235,49"/>
74</map>
75  <img src="uml_class_diagram_for_googleap_39.gif" alt='' usemap="#uml_class_diagram_for_googleap_39" ismap="ismap" class="graph-without-title" />
76</center>
77</center>
78<hr />
79<pre class="literalblock">
80Model class for JSON.
81
82Serializes and de-serializes between JSON and the Python
83object representation of HTTP request and response bodies.
84
85</pre>
86
87<!-- ==================== INSTANCE METHODS ==================== -->
88<a name="section-InstanceMethods"></a>
89<table class="summary" border="1" cellpadding="3"
90       cellspacing="0" width="100%" bgcolor="white">
91<tr bgcolor="#70b0f0" class="table-header">
92  <td colspan="2" class="table-header">
93    <table border="0" cellpadding="0" cellspacing="0" width="100%">
94      <tr valign="top">
95        <td align="left"><span class="table-header">Instance Methods</span></td>
96        <td align="right" valign="top"
97         ><span class="options">[<a href="#section-InstanceMethods"
98         class="privatelink" onclick="toggle_private();"
99         >hide private</a>]</span></td>
100      </tr>
101    </table>
102  </td>
103</tr>
104<tr>
105    <td width="15%" align="right" valign="top" class="summary">
106      <span class="summary-type">&nbsp;</span>
107    </td><td class="summary">
108      <table width="100%" cellpadding="0" cellspacing="0" border="0">
109        <tr>
110          <td><span class="summary-sig"><a href="googleapiclient.model.JsonModel-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
111        <span class="summary-sig-arg">data_wrapper</span>=<span class="summary-sig-default">False</span>)</span><br />
112      Construct a JsonModel.</td>
113          <td align="right" valign="top">
114            <span class="codelink"><a href="googleapiclient.model-pysrc.html#JsonModel.__init__">source&nbsp;code</a></span>
115
116          </td>
117        </tr>
118      </table>
119
120    </td>
121  </tr>
122<tr>
123    <td width="15%" align="right" valign="top" class="summary">
124      <span class="summary-type">&nbsp;</span>
125    </td><td class="summary">
126      <table width="100%" cellpadding="0" cellspacing="0" border="0">
127        <tr>
128          <td><span class="summary-sig"><a href="googleapiclient.model.JsonModel-class.html#serialize" class="summary-sig-name">serialize</a>(<span class="summary-sig-arg">self</span>,
129        <span class="summary-sig-arg">body_value</span>)</span><br />
130      Perform the actual Python object serialization.</td>
131          <td align="right" valign="top">
132            <span class="codelink"><a href="googleapiclient.model-pysrc.html#JsonModel.serialize">source&nbsp;code</a></span>
133
134          </td>
135        </tr>
136      </table>
137
138    </td>
139  </tr>
140<tr>
141    <td width="15%" align="right" valign="top" class="summary">
142      <span class="summary-type">&nbsp;</span>
143    </td><td class="summary">
144      <table width="100%" cellpadding="0" cellspacing="0" border="0">
145        <tr>
146          <td><span class="summary-sig"><a href="googleapiclient.model.JsonModel-class.html#deserialize" class="summary-sig-name">deserialize</a>(<span class="summary-sig-arg">self</span>,
147        <span class="summary-sig-arg">content</span>)</span><br />
148      Perform the actual deserialization from response string to Python
149object.</td>
150          <td align="right" valign="top">
151            <span class="codelink"><a href="googleapiclient.model-pysrc.html#JsonModel.deserialize">source&nbsp;code</a></span>
152
153          </td>
154        </tr>
155      </table>
156
157    </td>
158  </tr>
159<tr>
160    <td width="15%" align="right" valign="top" class="summary">
161      <span class="summary-type">&nbsp;</span>
162    </td><td class="summary">
163      <table width="100%" cellpadding="0" cellspacing="0" border="0">
164        <tr>
165          <td><span class="summary-sig"><a href="googleapiclient.model.JsonModel-class.html#no_content_response" class="summary-sig-name">no_content_response</a>(<span class="summary-sig-arg">self</span>)</span></td>
166          <td align="right" valign="top">
167            <span class="codelink"><a href="googleapiclient.model-pysrc.html#JsonModel.no_content_response">source&nbsp;code</a></span>
168
169          </td>
170        </tr>
171      </table>
172
173    </td>
174  </tr>
175  <tr>
176    <td colspan="2" class="summary">
177    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="googleapiclient.model.BaseModel-class.html">BaseModel</a></code></b>:
178      <code><a href="googleapiclient.model.BaseModel-class.html#request">request</a></code>,
179      <code><a href="googleapiclient.model.BaseModel-class.html#response">response</a></code>
180      </p>
181    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="googleapiclient.model.BaseModel-class.html">BaseModel</a></code></b> (private):
182      <code><a href="googleapiclient.model.BaseModel-class.html#_build_query" onclick="show_private();">_build_query</a></code>,
183      <code><a href="googleapiclient.model.BaseModel-class.html#_log_request" onclick="show_private();">_log_request</a></code>,
184      <code><a href="googleapiclient.model.BaseModel-class.html#_log_response" onclick="show_private();">_log_response</a></code>
185      </p></div>
186    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
187      <code>__delattr__</code>,
188      <code>__format__</code>,
189      <code>__getattribute__</code>,
190      <code>__hash__</code>,
191      <code>__new__</code>,
192      <code>__reduce__</code>,
193      <code>__reduce_ex__</code>,
194      <code>__repr__</code>,
195      <code>__setattr__</code>,
196      <code>__sizeof__</code>,
197      <code>__str__</code>,
198      <code>__subclasshook__</code>
199      </p>
200    </td>
201  </tr>
202</table>
203<!-- ==================== CLASS VARIABLES ==================== -->
204<a name="section-ClassVariables"></a>
205<table class="summary" border="1" cellpadding="3"
206       cellspacing="0" width="100%" bgcolor="white">
207<tr bgcolor="#70b0f0" class="table-header">
208  <td colspan="2" class="table-header">
209    <table border="0" cellpadding="0" cellspacing="0" width="100%">
210      <tr valign="top">
211        <td align="left"><span class="table-header">Class Variables</span></td>
212        <td align="right" valign="top"
213         ><span class="options">[<a href="#section-ClassVariables"
214         class="privatelink" onclick="toggle_private();"
215         >hide private</a>]</span></td>
216      </tr>
217    </table>
218  </td>
219</tr>
220<tr>
221    <td width="15%" align="right" valign="top" class="summary">
222      <span class="summary-type">&nbsp;</span>
223    </td><td class="summary">
224        <a name="accept"></a><span class="summary-name">accept</span> = <code title="'application/json'">'application/json'</code>
225    </td>
226  </tr>
227<tr>
228    <td width="15%" align="right" valign="top" class="summary">
229      <span class="summary-type">&nbsp;</span>
230    </td><td class="summary">
231        <a name="content_type"></a><span class="summary-name">content_type</span> = <code title="'application/json'">'application/json'</code>
232    </td>
233  </tr>
234<tr>
235    <td width="15%" align="right" valign="top" class="summary">
236      <span class="summary-type">&nbsp;</span>
237    </td><td class="summary">
238        <a name="alt_param"></a><span class="summary-name">alt_param</span> = <code title="'json'">'json'</code>
239    </td>
240  </tr>
241</table>
242<!-- ==================== PROPERTIES ==================== -->
243<a name="section-Properties"></a>
244<table class="summary" border="1" cellpadding="3"
245       cellspacing="0" width="100%" bgcolor="white">
246<tr bgcolor="#70b0f0" class="table-header">
247  <td colspan="2" class="table-header">
248    <table border="0" cellpadding="0" cellspacing="0" width="100%">
249      <tr valign="top">
250        <td align="left"><span class="table-header">Properties</span></td>
251        <td align="right" valign="top"
252         ><span class="options">[<a href="#section-Properties"
253         class="privatelink" onclick="toggle_private();"
254         >hide private</a>]</span></td>
255      </tr>
256    </table>
257  </td>
258</tr>
259  <tr>
260    <td colspan="2" class="summary">
261    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
262      <code>__class__</code>
263      </p>
264    </td>
265  </tr>
266</table>
267<!-- ==================== METHOD DETAILS ==================== -->
268<a name="section-MethodDetails"></a>
269<table class="details" border="1" cellpadding="3"
270       cellspacing="0" width="100%" bgcolor="white">
271<tr bgcolor="#70b0f0" class="table-header">
272  <td colspan="2" class="table-header">
273    <table border="0" cellpadding="0" cellspacing="0" width="100%">
274      <tr valign="top">
275        <td align="left"><span class="table-header">Method Details</span></td>
276        <td align="right" valign="top"
277         ><span class="options">[<a href="#section-MethodDetails"
278         class="privatelink" onclick="toggle_private();"
279         >hide private</a>]</span></td>
280      </tr>
281    </table>
282  </td>
283</tr>
284</table>
285<a name="__init__"></a>
286<div>
287<table class="details" border="1" cellpadding="3"
288       cellspacing="0" width="100%" bgcolor="white">
289<tr><td>
290  <table width="100%" cellpadding="0" cellspacing="0" border="0">
291  <tr valign="top"><td>
292  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
293        <span class="sig-arg">data_wrapper</span>=<span class="sig-default">False</span>)</span>
294    <br /><em class="fname">(Constructor)</em>
295  </h3>
296  </td><td align="right" valign="top"
297    ><span class="codelink"><a href="googleapiclient.model-pysrc.html#JsonModel.__init__">source&nbsp;code</a></span>&nbsp;
298    </td>
299  </tr></table>
300
301  <pre class="literalblock">
302Construct a JsonModel.
303
304Args:
305  data_wrapper: boolean, wrap requests and responses in a data wrapper
306
307</pre>
308  <dl class="fields">
309    <dt>Overrides:
310        object.__init__
311    </dt>
312  </dl>
313</td></tr></table>
314</div>
315<a name="serialize"></a>
316<div>
317<table class="details" border="1" cellpadding="3"
318       cellspacing="0" width="100%" bgcolor="white">
319<tr><td>
320  <table width="100%" cellpadding="0" cellspacing="0" border="0">
321  <tr valign="top"><td>
322  <h3 class="epydoc"><span class="sig"><span class="sig-name">serialize</span>(<span class="sig-arg">self</span>,
323        <span class="sig-arg">body_value</span>)</span>
324  </h3>
325  </td><td align="right" valign="top"
326    ><span class="codelink"><a href="googleapiclient.model-pysrc.html#JsonModel.serialize">source&nbsp;code</a></span>&nbsp;
327    </td>
328  </tr></table>
329
330  <pre class="literalblock">
331Perform the actual Python object serialization.
332
333Args:
334  body_value: object, the request body as a Python object.
335
336Returns:
337  string, the body in serialized form.
338
339</pre>
340  <dl class="fields">
341    <dt>Overrides:
342        <a href="googleapiclient.model.BaseModel-class.html#serialize">BaseModel.serialize</a>
343        <dd><em class="note">(inherited documentation)</em></dd>
344    </dt>
345  </dl>
346</td></tr></table>
347</div>
348<a name="deserialize"></a>
349<div>
350<table class="details" border="1" cellpadding="3"
351       cellspacing="0" width="100%" bgcolor="white">
352<tr><td>
353  <table width="100%" cellpadding="0" cellspacing="0" border="0">
354  <tr valign="top"><td>
355  <h3 class="epydoc"><span class="sig"><span class="sig-name">deserialize</span>(<span class="sig-arg">self</span>,
356        <span class="sig-arg">content</span>)</span>
357  </h3>
358  </td><td align="right" valign="top"
359    ><span class="codelink"><a href="googleapiclient.model-pysrc.html#JsonModel.deserialize">source&nbsp;code</a></span>&nbsp;
360    </td>
361  </tr></table>
362
363  <pre class="literalblock">
364Perform the actual deserialization from response string to Python
365object.
366
367Args:
368  content: string, the body of the HTTP response
369
370Returns:
371  The body de-serialized as a Python object.
372
373</pre>
374  <dl class="fields">
375    <dt>Overrides:
376        <a href="googleapiclient.model.BaseModel-class.html#deserialize">BaseModel.deserialize</a>
377        <dd><em class="note">(inherited documentation)</em></dd>
378    </dt>
379  </dl>
380</td></tr></table>
381</div>
382<a name="no_content_response"></a>
383<div>
384<table class="details" border="1" cellpadding="3"
385       cellspacing="0" width="100%" bgcolor="white">
386<tr><td>
387  <table width="100%" cellpadding="0" cellspacing="0" border="0">
388  <tr valign="top"><td>
389  <h3 class="epydoc"><span class="sig"><span class="sig-name">no_content_response</span>(<span class="sig-arg">self</span>)</span>
390  </h3>
391  </td><td align="right" valign="top"
392    ><span class="codelink"><a href="googleapiclient.model-pysrc.html#JsonModel.no_content_response">source&nbsp;code</a></span>&nbsp;
393    </td>
394  </tr></table>
395
396
397  <dl class="fields">
398    <dt>Decorators:</dt>
399    <dd><ul class="nomargin-top">
400        <li><code>@property</code></li>
401    </ul></dd>
402    <dt>Overrides:
403        <a href="googleapiclient.model.BaseModel-class.html#no_content_response">no_content_response</a>
404    </dt>
405  </dl>
406</td></tr></table>
407</div>
408<br />
409<!-- ==================== NAVIGATION BAR ==================== -->
410<table class="navbar" border="0" width="100%" cellpadding="0"
411       bgcolor="#a0c0ff" cellspacing="0">
412  <tr valign="middle">
413  <!-- Home link -->
414      <th>&nbsp;&nbsp;&nbsp;<a
415        href="googleapiclient-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
416
417  <!-- Tree link -->
418      <th>&nbsp;&nbsp;&nbsp;<a
419        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
420
421  <!-- Index link -->
422      <th>&nbsp;&nbsp;&nbsp;<a
423        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
424
425  <!-- Help link -->
426      <th>&nbsp;&nbsp;&nbsp;<a
427        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
428
429      <th class="navbar" width="100%"></th>
430  </tr>
431</table>
432<table border="0" cellpadding="0" cellspacing="0" width="100%%">
433  <tr>
434    <td align="left" class="footer">
435    Generated by Epydoc 3.0.1 on Fri Jun 14 15:57:28 2019
436    </td>
437    <td align="right" class="footer">
438      <a target="mainFrame" href="http://epydoc.sourceforge.net"
439        >http://epydoc.sourceforge.net</a>
440    </td>
441  </tr>
442</table>
443
444<script type="text/javascript">
445  <!--
446  // Private objects are initially displayed (because if
447  // javascript is turned off then we want them to be
448  // visible); but by default, we want to hide them.  So hide
449  // them unless we have a cookie that says to show them.
450  checkCookie();
451  // -->
452</script>
453</body>
454</html>
455