Created
December 18, 2017 05:42
-
-
Save randallsquared/3647866a0ab06c4559f82ce1b568af2e to your computer and use it in GitHub Desktop.
Issues with translation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Once you start converting | |
{ | |
"uber": { | |
"data": [ | |
{"name": "givenName", "value": "Will"}, | |
{"name": "givenName", "value": "Tom"} | |
] | |
} | |
} | |
//to (other fields elided) | |
{ | |
"givenName": ["Will", "Tom"] | |
} | |
//you're going to have trouble with | |
{ | |
"uber": { | |
"data": [ | |
{"name": "givenName", "value": "Will"}, | |
{"name": "lastName", "value": "Williams"}, | |
{"name": "givenName", "value": "Tom"}, | |
{"name": "lastName", "value": "Thompson"} | |
] | |
} | |
} | |
//because now you'll have munged it to (other fields elided) | |
{ | |
"givenName": ["Will", "Tom"], | |
"lastName": ["Williams", "Thompson"] | |
} | |
//and lost the connection between Will and Williams. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment