Skip to content

[Discussion] use nlohmann::ordered_json to preserve insert order? #79

@zhjwpku

Description

@zhjwpku

The current implementation utilizes nlohmann::json for serialization, which does not maintain the insertion order of elements. In contrast, the Java implementation[0] appears to preserve the order of elements. Notably, nlohmann offers an ordered_json[1] variant, so I'd like to know should we take the effort to preserve the insert order?

[0] https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/SnapshotParser.java#L57-L110
[1] https://json.nlohmann.me/api/ordered_json/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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