Closed g00g1 closed 8 months ago
Hello, It looks like you've identified the LACNIC RDAP service responding with invalid jCards (jCard = JSON vCard):
The jCard format used in RDAP specifies a "language-tag" as the following: https://www.rfc-editor.org/rfc/rfc7095#section-3.5.12
["lang", {}, "language-tag", "de"]
However for your example IP 148.223.0.0
, the LACNIC RDAP service returns the following instead:
[
"lang",
{
"type": "language-tag"
},
"en"
]
(i.e. the array contains three elements when the minimum is four, and it doesn't match RFC7095 3.5.12).
I will report this to LACNIC :).
The jCard parser currently refuses to parse a jCard if there are any errors.
Would you be interested in a function which parses a jCard as best as possible, and ignores any invalid properties?
Would you be interested in a function which parses a jCard as best as possible, and ignores any invalid properties?
Yes, that would be very helpful.
It looks like LACNIC has fixed their responses already (with an impressive response time on a Sunday!), as the 148.223.0.0
example now returns the correct format:
[
"lang",
{},
"language-tag",
"en"
]
Thus your initial problem should be resolved.
I'll continue to work on commit https://github.com/openrdap/rdap/commit/79e3d521a14aa904d862e11c3da19e2d342b966a, it has usage like vcard, err := NewVCardWithOptions(json, VCardOptions{IgnoreInvalidProperties: true})
to ignore invalid properties.
Alright, I think the problem is solved in two ways now :)
Hello.
I am trying to access VCard property of LACNIC resources (for example, IPv4 address
148.223.0.0
), however it seems like openrdap/rdap package is unable to parse their response due tojCard error: jCard property too short (>=4 array elements required)
while decoding the VCard field.Is this the intended behaviour or known issue?