openrdap / rdap

RDAP command line client
https://www.openrdap.org
MIT License
230 stars 36 forks source link

Failing to parse vcards from .is rdap server response #28

Open ivulfson opened 1 week ago

ivulfson commented 1 week ago

Disclaimer: I'm not affiliated with .is in any way. Just found it randomly:

https://rdap.isnic.is/rdap/domain/government.is

We're failing to parse vcards with vcardArray: jCard error: jCard parameters invalid.

Normally we have

                "vcard",
                [
                    [
                        "version",
                        {},
                        "text",
                        "4.0"
                    ],

Second parameter is a map. This is parsed in readParameters().

However .is responds with:

            "vcardArray": [
                "vcard",
                [
                    [
                        "version",
                        [],
                        "text",
                        "4.0"
                    ],

Second parameter is a slice. Lower in the same vcard they have a proper one:

                    [
                        "tel",
                        {
                            "type": [
                                "voice"
                            ]
                        },
                        "uri",
                        "tel:+354-898-8057"
                    ]

Will do a PR to address.