Companion to Parse EMV TLV (closed in #11). A Build EMV TLV operation would accept structured tag-value input and emit BER-TLV encoded hex, completing the round-trip.
Use cases
- Constructing DE 55 payloads for test harnesses or ISO 8583 message simulation
- Editing a parsed TLV structure: parse then modify values then re-encode
- Building GPO responses, READ RECORD data, or other ICC response templates for issuer-side or terminal emulation work
Proposed operation: Build EMV TLV
Input: JSON array of tag-value objects, e.g.:
[
{ "tag": "9F26", "value": "A1B2C3D4E5F60708" },
{ "tag": "9F36", "value": "0001" },
{ "tag": "77", "children": [
{ "tag": "82", "value": "5900" },
{ "tag": "94", "value": "08010401" }
]}
]
Output: BER-TLV hex, suitable for piping into Parse EMV TLV for round-trip verification.
Arguments: Output format: Hex | Annotated (human-readable with tag names from the dictionary)
Notes
- Constructed/primitive bit inferred from the EMV tag dictionary (same dict used by Parse EMV TLV), falling back to presence of a children key
- Tag lengths computed automatically from value length
- JSON input format should round-trip cleanly with the JSON output of Parse EMV TLV
- Lower priority than the parse direction; most valuable for issuer simulation and test tooling
Module
Payment
Companion to Parse EMV TLV (closed in #11). A Build EMV TLV operation would accept structured tag-value input and emit BER-TLV encoded hex, completing the round-trip.
Use cases
Proposed operation: Build EMV TLV
Input: JSON array of tag-value objects, e.g.:
Output: BER-TLV hex, suitable for piping into Parse EMV TLV for round-trip verification.
Arguments: Output format: Hex | Annotated (human-readable with tag names from the dictionary)
Notes
Module
Payment