← 返回首页
Option to keep tuples on the same line · Issue #100 · python-rapidjson/python-rapidjson · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Option to keep tuples on the same line #100

New issue
New issue

Description

I'm using rapidjson (great package, thank you!) to dump contents to a json file, and I use indent=0 to get a readable/diffable file.

However I have many tuples in my files, such as transformation matrices, and (though JSON has no tuple type) it would be nice to have them all on the same line instead of broken down, which makes the file harder tor ead and larger.

So basically:

[{"matrix": (1, 0, 0, 1, 181, 0)}, {"matrix": (1, 0, 0, 1, 0, 0)}]

would become:

[ { "matrix": [1, 0, 0, 1, 181, 0] }, { "matrix": [1, 0, 0, 1, 181, 0] } ]

instead of:

[ { "matrix": [ 1, 0, 0, 1, 181, 0 ] }, { "matrix": [ 1, 0, 0, 1, 181, 0 ] } ]

because tuples wouldn't get flattened.

Does that sound reasonable / is it feasible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    • Open in GitHub Copilot app

    Footer

    © 2026 GitHub, Inc.