question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cert package -- request test for serialization of example data

See original GitHub issue

May a test please be added to show what the exampleData looks like after it has been flattened?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
xpepermintcommented, Feb 24, 2019

@fulldecent Based on NY meeting, I’ve prepared https://github.com/0xcert/framework-cert-test and include certification nonces https://github.com/0xcert/framework/issues/378.

0reactions
xpepermintcommented, Feb 11, 2019

Here are the steps that buildSchemaProps creates for exampleSchema/exampleData:

value: {
  "path": [
    "books",
    0,
    "note"
  ],
  "value": "A0",
  "key": "books.0.note",
  "group": "books.0"
}
value: {
  "path": [
    "books",
    0,
    "title"
  ],
  "value": "B0",
  "key": "books.0.title",
  "group": "books.0"
}
object: [
  {
    "path": [
      "books",
      0,
      "note"
    ],
    "value": "A0",
    "key": "books.0.note",
    "group": "books.0"
  },
  {
    "path": [
      "books",
      0,
      "title"
    ],
    "value": "B0",
    "key": "books.0.title",
    "group": "books.0"
  }
]
value: {
  "path": [
    "books",
    1,
    "note"
  ],
  "value": "A1",
  "key": "books.1.note",
  "group": "books.1"
}
value: {
  "path": [
    "books",
    1,
    "title"
  ],
  "value": "B1",
  "key": "books.1.title",
  "group": "books.1"
}
object: [
  {
    "path": [
      "books",
      1,
      "note"
    ],
    "value": "A1",
    "key": "books.1.note",
    "group": "books.1"
  },
  {
    "path": [
      "books",
      1,
      "title"
    ],
    "value": "B1",
    "key": "books.1.title",
    "group": "books.1"
  }
]
array: [
  {
    "path": [
      "books",
      0,
      "note"
    ],
    "value": "A0",
    "key": "books.0.note",
    "group": "books.0"
  },
  {
    "path": [
      "books",
      0,
      "title"
    ],
    "value": "B0",
    "key": "books.0.title",
    "group": "books.0"
  },
  {
    "path": [
      "books",
      1,
      "note"
    ],
    "value": "A1",
    "key": "books.1.note",
    "group": "books.1"
  },
  {
    "path": [
      "books",
      1,
      "title"
    ],
    "value": "B1",
    "key": "books.1.title",
    "group": "books.1"
  }
]
value: {
  "path": [
    "email"
  ],
  "value": "A",
  "key": "email",
  "group": ""
}
value: {
  "path": [
    "event",
    "organizer",
    "email"
  ],
  "value": "A",
  "key": "event.organizer.email",
  "group": "event.organizer"
}
value: {
  "path": [
    "event",
    "organizer",
    "name"
  ],
  "value": "B",
  "key": "event.organizer.name",
  "group": "event.organizer"
}
object: [
  {
    "path": [
      "event",
      "organizer",
      "email"
    ],
    "value": "A",
    "key": "event.organizer.email",
    "group": "event.organizer"
  },
  {
    "path": [
      "event",
      "organizer",
      "name"
    ],
    "value": "B",
    "key": "event.organizer.name",
    "group": "event.organizer"
  }
]
value: {
  "path": [
    "event",
    "title"
  ],
  "value": "A",
  "key": "event.title",
  "group": "event"
}
object: [
  {
    "path": [
      "event",
      "organizer",
      "email"
    ],
    "value": "A",
    "key": "event.organizer.email",
    "group": "event.organizer"
  },
  {
    "path": [
      "event",
      "organizer",
      "name"
    ],
    "value": "B",
    "key": "event.organizer.name",
    "group": "event.organizer"
  },
  {
    "path": [
      "event",
      "title"
    ],
    "value": "A",
    "key": "event.title",
    "group": "event"
  }
]
value: {
  "path": [
    "name"
  ],
  "value": "B",
  "key": "name",
  "group": ""
}
value: {
  "path": [
    "tags",
    0
  ],
  "value": 1,
  "key": "tags.0",
  "group": "tags"
}
value: {
  "path": [
    "tags",
    1
  ],
  "value": 2,
  "key": "tags.1",
  "group": "tags"
}
array: [
  {
    "path": [
      "tags",
      0
    ],
    "value": 1,
    "key": "tags.0",
    "group": "tags"
  },
  {
    "path": [
      "tags",
      1
    ],
    "value": 2,
    "key": "tags.1",
    "group": "tags"
  }
]
object: [
  {
    "path": [
      "books",
      0,
      "note"
    ],
    "value": "A0",
    "key": "books.0.note",
    "group": "books.0"
  },
  {
    "path": [
      "books",
      0,
      "title"
    ],
    "value": "B0",
    "key": "books.0.title",
    "group": "books.0"
  },
  {
    "path": [
      "books",
      1,
      "note"
    ],
    "value": "A1",
    "key": "books.1.note",
    "group": "books.1"
  },
  {
    "path": [
      "books",
      1,
      "title"
    ],
    "value": "B1",
    "key": "books.1.title",
    "group": "books.1"
  },
  {
    "path": [
      "email"
    ],
    "value": "A",
    "key": "email",
    "group": ""
  },
  {
    "path": [
      "event",
      "organizer",
      "email"
    ],
    "value": "A",
    "key": "event.organizer.email",
    "group": "event.organizer"
  },
  {
    "path": [
      "event",
      "organizer",
      "name"
    ],
    "value": "B",
    "key": "event.organizer.name",
    "group": "event.organizer"
  },
  {
    "path": [
      "event",
      "title"
    ],
    "value": "A",
    "key": "event.title",
    "group": "event"
  },
  {
    "path": [
      "name"
    ],
    "value": "B",
    "key": "name",
    "group": ""
  },
  {
    "path": [
      "tags",
      0
    ],
    "value": 1,
    "key": "tags.0",
    "group": "tags"
  },
  {
    "path": [
      "tags",
      1
    ],
    "value": 2,
    "key": "tags.1",
    "group": "tags"
  }
]
Read more comments on GitHub >

github_iconTop Results From Across the Web

requests_pkcs12/requests_pkcs12.py at master - GitHub
Add PKCS#12 support to the Python requests library in a clean way, without monkey ... buf = cert.public_bytes(cryptography.hazmat.primitives.serialization.
Read more >
X.509 Reference — Cryptography 39.0.0.dev1 documentation
Deserialize a certificate signing request (CSR) from PEM encoded data. PEM requests are base64 decoded and have delimiters that look like -----BEGIN CERTIFICATE...
Read more >
Serialization in Java with Examples | learntek.org
To test serialization, we'll first populate the fields of the data value object. Now we'll call serialization method by passing the file name ......
Read more >
Serialization in Java [Advantages and Examples Explained]
Deserialization is the exact opposite process of serialization where the byte data type stream is converted back to an object in the memory....
Read more >
crypto/x509 - Go Packages
Package x509 parses X.509-encoded keys and certificates. ... CreateCertificateRequest creates a new certificate request based on a template.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found