docs: def dump_json_data(page):
      """
      Return a python dict representation of this page for use as part of
      a JSON export.
      """
      def content_langs_ordered():
          """
          Return a list of languages ordered by the page content
          with the latest creation date in each.  This will be used
          to maintain the state of the language_up_to_date template
          tag when a page is restored or imported into another site.
          """
          params = {'page': page}
          if page.freeze_date:
              params['creation_date__lte'] = page.freeze_date
          cqs = Content.objects.filter(**params)
          cqs = cqs.values('language').annotate(latest=Max('creation_date'))
          return [c['language'] for c in cqs.order_by('latest')]
      languages = content_langs_ordered()
  
      def language_content(ctype):
          return dict(
              (lang, page.get_content(lang, ctype, language_fallback=False))
              for lang in languages)
  
      def placeholder_content():
          """Return content of each placeholder in each language."""
          out = {}
          for p in get_placeholders(page.get_template()):
              if p.ctype in ('title', 'slug'):
                  continue  # these were already included
              out[p.name] = language_content(p.name)
          return out
  
      def isoformat(d):
          return None if d is None else d.strftime(ISODATE_FORMAT)
  
      def custom_email(user):
          """Allow a user's profile to return an email for the user."""
          return user.email
  
      tags = []
      if settings.PAGE_TAGGING:
          tags = [tag.name for tag in page.tags.all()]
  
      return {
          'complete_slug': dict(
              (lang, page.get_complete_slug(lang, hideroot=False))
              for lang in languages),
          'title': language_content('title'),
          'author_email': custom_email(page.author),
          'creation_date': isoformat(page.creation_date),
          'publication_date': isoformat(page.publication_date),
          'publication_end_date': isoformat(page.publication_end_date),
          'last_modification_date': isoformat(page.last_modification_date),
          'status': {
              Page.PUBLISHED: 'published',
              Page.HIDDEN: 'hidden',
              Page.DRAFT: 'draft'}[page.status],
          'template': page.template,
          'sites': (
              [site.domain for site in page.sites.all()]
              if settings.PAGE_USE_SITE_ID else []),
          'redirect_to_url': page.redirect_to_url,
          'redirect_to_complete_slug': dict(
              (lang, page.redirect_to.get_complete_slug(
                  lang, hideroot=False))
              for lang in page.redirect_to.get_languages()
              ) if page.redirect_to is not None else None,
          'content': placeholder_content(),
          'content_language_updated_order': languages,
          'tags': tags,
      }