-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
naming conventions for collections #7
Comments
How do you propose it is displayed in the resource viewer however where it'll be |
That's an interesting point, this would add inconvenience in mapping resource definitions to JSON. |
we've talked about this on and off, but not as much as I expected to.
Either
- xml and json names differ
- xml name is plural
- json name is singular
is either is plural, then the question is, what's the algorithm for
pluralising them? Would it be the java one in the build tool?
I think the current arrangement is least worse....
Grahame
…On Tue, Jun 20, 2017 at 2:00 AM, Dmitri Sotnikov ***@***.***> wrote:
Problem
Idiomatic JSON naming convention is to use plural names for collections,
e.g:
{
"name": [...]
}
Solution
We propose using plural names to hint that the value is a collection type:
{
"names": [...]
}
This convention provides a hint to the user to indicate that the value
referenced by the key is a collection, and makes it easier to navigate the
JSON structure.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#7>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AFllFcubdnhry8AU9fReDlArAHpWXBqvks5sFpsXgaJpZM4N-cMg>
.
--
-----
http://www.healthintersections.com.au / [email protected]
/ +61 411 867 065
|
fair enough |
Asking a possibly stupid question, why not call it |
that would be the 'make the XML name plural' option.
And the simple reason is: FHIR was originally derived from 37Signals
'baseacamp', and they did it the way we do it.
How's that for a prosaic?
Grahame
…On Thu, Jun 29, 2017 at 10:50 PM, Vadim Peretokin ***@***.***> wrote:
Asking a possibly stupid question, why not call it names in the FHIR
resource model if has max >1 multiplicity?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFllFaN608KraeA88JTe2PLa0Q3DASSGks5sI52HgaJpZM4N-cMg>
.
--
-----
http://www.healthintersections.com.au / [email protected]
/ +61 411 867 065
|
Yep, fair enough. XML is still kicking around so it's a topic to revisit in a decade... |
there's one thing the json crowd could do to make it easier for us to fix
on json only eventually, and that's to add comments.
Grahame
…On Fri, Jun 30, 2017 at 12:30 AM, Vadim Peretokin ***@***.***> wrote:
Yep, fair enough. XML is still kicking around so it's a topic to revisit
in a decade...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFllFe4qs0ZQ3JxytMXB9IUrtbOPi6toks5sI7UIgaJpZM4N-cMg>
.
--
-----
http://www.healthintersections.com.au / [email protected]
/ +61 411 867 065
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
Idiomatic JSON naming convention is to use plural names for collections, e.g:
Solution
We propose using plural names to hint that the value is a collection type:
This convention provides a hint to the user to indicate that the value referenced by the key is a collection, and makes it easier to navigate the JSON structure.
The text was updated successfully, but these errors were encountered: