Skip to content

Calling to_string() method on some data #689

@dandyvica

Description

@dandyvica

Hi @sunng87

Thanks for your amazing work.

Suppose you have a data structure which is mapped to the following JSON:

{
  "name": ".",
  "type": "RRSIG",
  "class": "IN",
  "ttl": 172800,
  "rd_length": 275,
  "rdata": {
    "type_covered": "DNSKEY",
    "algorithm": "RSASHA256",
    "labels": 0,
    "ttl": 172800,
    "sign_expiration": "20250110000000",
    "sign_inception": "20241220000000",
    "name": ".",
    "signature":  "blabla"
  }

The rdata field is a Rust structure for which the to_string() exists. Is it possible to code a helper to call that to_string() method in a template ?
The rdata field is not always the same (actually an enum).

Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions