mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
RDAP: Add clarification about formatting of embedded vCard addresses
Gustavo Lozano confirmed that street addresses should be formatted as a string if there is only one line, or an nested array of strings if there is more than one. Luckily we already do it this way, so we just need to update the comment. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=196845222
This commit is contained in:
parent
c7ca0ea2aa
commit
36439d02b3
1 changed files with 10 additions and 0 deletions
|
@ -1096,6 +1096,16 @@ public class RdapJsonFormatter {
|
|||
// "Hometown", "PA", "18252", "U.S.A."
|
||||
// ]
|
||||
// ]
|
||||
//
|
||||
// Gustavo further clarified that the embedded array should only be used if there is more than
|
||||
// one line:
|
||||
//
|
||||
// My reading of RFC 7095 is that if only one element is known, it must be a string. If
|
||||
// multiple elements are known (e.g. two or three street elements were provided in the case of
|
||||
// the EPP contact data model), an array must be used.
|
||||
//
|
||||
// I don’t think that one street address line nested in a single-element array is valid
|
||||
// according to RFC 7095.
|
||||
ImmutableList<String> street = address.getStreet();
|
||||
if (street.isEmpty()) {
|
||||
jsonBuilder.add("");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue