Skip to content

Add ensure_ascii argument to json.tool #75399

Closed

Description

@qingyunha
mannequin
BPO 31216
Nosy @bitdancer, @qingyunha
Superseder
  • bpo-27413: Add an option to json.tool to bypass non-ASCII characters.
  • Files
  • jsontool.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-08-16.12:21:46.134>
    created_at = <Date 2017-08-16.05:46:56.556>
    labels = ['3.7', 'type-feature', 'library']
    title = 'Add ensure_ascii argument to  json.tool'
    updated_at = <Date 2017-08-16.12:21:46.132>
    user = 'https://github.com/qingyunha'

    bugs.python.org fields:

    activity = <Date 2017-08-16.12:21:46.132>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-08-16.12:21:46.134>
    closer = 'r.david.murray'
    components = ['Library (Lib)']
    creation = <Date 2017-08-16.05:46:56.556>
    creator = 'qingyunha'
    dependencies = []
    files = ['47083']
    hgrepos = []
    issue_num = 31216
    keywords = ['patch']
    message_count = 2.0
    messages = ['300327', '300353']
    nosy_count = 2.0
    nosy_names = ['r.david.murray', 'qingyunha']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '27413'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue31216'
    versions = ['Python 3.7']

    Activity

    1. qingyunha commented on Aug 16, 2017

      qingyunhamannequin
      MannequinAuthor

      Sometimes I want this

      $ echo -e '"\xe4\xbd\xa0\xe5\xa5\xbd"' | ./python -m json.tool --no-escape                         
      "你好"
      

      not just

      $ echo -e '"\xe4\xbd\xa0\xe5\xa5\xbd"' | ./python -m json.tool
      "\u4f60\u597d" 
      
    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Aug 16, 2017
    3. bitdancer commented on Aug 16, 2017

      @bitdancer
      Member

      This is a duplicate of bpo-27413.

    4. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions