Skip to content

Explain complex attributes, again #504

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

Closed
wants to merge 3 commits into from

Conversation

bintoro
Copy link
Contributor

@bintoro bintoro commented Mar 23, 2015

The current explanation on complex attributes doesn't seem to be getting the point through. Once again, there was an issue opened asking how to do it.

Let's see if this revision does the trick.

A usage example was previously rejected from the base spec, so this time it's placed on the repurposed Examples page, introduced in PR #503.

@bintoro bintoro force-pushed the complex-attrs-2 branch 2 times, most recently from 1318cfa to f4cd8dd Compare March 23, 2015 23:47
([example](/examples/#complex-attributes)).

JSON API permits embedding arbitrary data structures as complex attributes in
resource objects. However, any object in a complex attribute **MUST** reserve
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bintoro This looks good! One small thing: would it be more accurate to keep the "object that constitutes or is contained in a complex attribute" language here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ethanresnick Maybe. The phrase was my brainchild, but then I started doubting its necessity. If you think it adds clarity, I'll put it back. It just doesn't seem like "any object in a complex attribute" could realistically be misinterpreted.

While we're at it, the first paragraph used to have another clause:

"Complex attributes" are attributes whose value is an object or array, which in turn may contain values of any type.

And the second paragraph started like this:

JSON API thus permits embedding...

But then I thought it might be overkill. What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I'm just responding to this! I've been bogged down with stuff :)

I think your simplifications were really good overall. It was only the removal of the "constitutes or is contained in" phrase that tripped me up initially. I agree, though, that it's unlikely that "any object in a complex attribute's value" could reasonably be misinterpreted. I still think there might be a value in precision here, but I guess I don't have strong feelings either way.

@tkellen
Copy link
Member

tkellen commented Apr 6, 2015

👍 for merge from me.

@dgeb
Copy link
Member

dgeb commented Apr 7, 2015

👍 from me as well - as soon as we widen our header to accommodate another item :)

@bintoro
Copy link
Contributor Author

bintoro commented May 21, 2015

Superseded by #653. I'll resubmit an example payload once the Examples page exists.

@bintoro bintoro closed this May 21, 2015
@bintoro bintoro deleted the complex-attrs-2 branch May 22, 2015 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy