moov-io / iso8583

A golang implementation to marshal and unmarshal iso8583 message.
https://moov.io
Apache License 2.0
304 stars 100 forks source link

Composite field with bitmap. Spec Builder.ImportJSON/ExportJSON #283

Closed Andrei-cloud closed 9 months ago

Andrei-cloud commented 9 months ago

Implementing missing composite with bitmap specification Builder.ImportJSON and ExportJSON

to be able to have composite fields specification defined with field bitmap:

{
    "name": "TEST Spec",
    "fields": {
        "1": {
            "type": "Composite",
            "length": 255,
            "description": "Private use field",
            "prefix": "ASCII.LL",
            "bitmap": {
                    "type": "Bitmap",
                    "length": 8,
                    "description": "Bitmap",
                    "enc": "HexToASCII",
                    "prefix": "Hex.Fixed",
                    "disableautoexpand": true
            },
            "subfields": {
                "1": {
                    "type": "String",
                    "length": 2,
                    "description": "Cardholder certificate Serial Number",
                    "enc": "ASCII",
                    "prefix": "ASCII.Fixed"
                },
                      // other subfields
alovak commented 9 months ago

@Andrei-cloud thanks for the PR! It looks good. I'll solve the issue with the linter and I think we can merge your suggested changes. I'll give it one more look shortly.

mfdeveloper508 commented 9 months ago

https://github.com/moov-io/iso8583/pull/285