Пример #1
0
    def serialize(self, opt_pretty=False):
        """Serialize this object into a JSON string.

    Args:
      opt_pretty: A flag indicating whether to pretty-print the JSON.

    Returns:
      The serialized representation of this object.
    """
        return serializer.toJSON(self, opt_pretty)
Пример #2
0
  def serialize(self, opt_pretty=False):
    """Serialize this object into a JSON string.

    Args:
      opt_pretty: A flag indicating whether to pretty-print the JSON.

    Returns:
      The serialized representation of this object.
    """
    return serializer.toJSON(self, opt_pretty)
Пример #3
0
    def serialize(self, opt_pretty=True):
        """Serialize this object into a JSON string.

    Args:
      opt_pretty: A flag indicating whether to pretty-print the JSON.

    Returns:
      A JSON represenation of this image.
    """
        return serializer.toJSON(self._filter, opt_pretty)
  def serialize(self, opt_pretty=True):
    """Serialize this collection into a JSON string.

    Args:
      opt_pretty: A flag indicating whether to pretty-print the JSON.

    Returns:
      A JSON represenation of this image.
    """
    # Pop off any unused filter wrappers that might have been added by filter.
    # We copy the object here, otherwise we might accidentally knock off a
    # filter in progress.
    item = self
    while (Collection._isFilterFeatureCollection(item) and
           item._description['filters'].predicateCount() == 0):
      item = item._description['collection']
    return serializer.toJSON(item._description, opt_pretty)
Пример #5
0
 def serialize(self):
   return serializer.toJSON(self)
Пример #6
0
 def serialize(self):
     """Returns the serialized representation of this object."""
     return serializer.toJSON(self)
Пример #7
0
 def serialize(self):
     """Returns the serialized representation of this object."""
     return serializer.toJSON(self)
Пример #8
0
 def serialize(self):
     return serializer.toJSON(self)
Пример #9
0
 def __str__(self):
     """Writes out the filter in a human-readable form."""
     return "Filter(%s)" % serializer.toJSON(self._filter)
Пример #10
0
 def __str__(self):
   """Writes out the feature in a human-readable form."""
   return 'Feature(%s)' % serializer.toJSON(self._description)
Пример #11
0
 def BoundFunction(*argsIn, **namedArgsIn):
   """A generated aggregation function for the given signature."""
   description = func(*argsIn, **namedArgsIn)
   return data.getValue({'json': serializer.toJSON(description, False)})
 def __str__(self):
   """Writes out the collection in a human-readable form."""
   return 'ImageCollection(%s)' % serializer.toJSON(self._description)