Skip to content

Feature request: per-container prefix #641

@jaskij

Description

@jaskij

Rather than set the prefix at the point of use, I'd like to set it on a container, essentially just prepending it to the rename value for all fields.

My use case is working with Wireshark's packet dissection JSON, which likes to prepend an object's name to all the field names inside said object, although the prefix is not always exact.

TBH, I'm not sure if this feature is better suited here, or in serde proper.

        "ip": {
          "ip.version": "4",
          "ip.hdr_len": "20",
          "ip.dsfield": "0x00",
          "ip.dsfield_tree": {
            "ip.dsfield.dscp": "0",
            "ip.dsfield.ecn": "0"
          },
          "ip.len": "101",
          "ip.id": "0xe2f4",
          "ip.flags": "0x00",
          "ip.flags_tree": {
            "ip.flags.rb": "0",
            "ip.flags.df": "0",
            "ip.flags.mf": "0"
          },
          "ip.frag_offset": "0",
          "ip.ttl": "30",
          "ip.proto": "6",
          "ip.checksum": "0x237c",
          "ip.checksum.status": "2",
          "ip.src": "192.168.10.101",
          "ip.addr": "192.168.10.109",
          "ip.src_host": "192.168.10.101",
          "ip.host": "192.168.10.109",
          "ip.dst": "192.168.10.109",
          "ip.dst_host": "192.168.10.109"
        },

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions