![JSON API Forums](https://i1.feedspot.com/5551653.jpg?t=1683091373)
JSON API Forums
3 FOLLOWERS
Welcome to the JSON: API discussion forum. Talk here about anything related to Json with fellow members, share knowledge on API designs, discuss questions and answers, learn to explore API with a live database in a browser, precheck id resource existence, and much more.
JSON API Forums
3d ago
Hii Guys!
I just wanted to pick your brains about using JSON for managing connections between things in my project. I am a bit stuck on some steps and how to do it right.
Here is where I am stuck:
When things are connected within other connected things, how should I set up the JSON response to keep it clear and easy to understand? Should these nested connections be part of the main thing, or shown separately?
How can I make sure information stays consistent when updating connected things? For instance, if I change one thing, and it affects other connected things, what’s the best way to handl ..read more
JSON API Forums
5d ago
Regarding pagination links, the specification says:
Pagination links MUST appear in the links object that corresponds to a collection. To paginate the primary data, supply pagination links in the top-level links object. To paginate an included collection returned in a compound document, supply pagination links in the corresponding links object.
But I´m confused about the included-collection part. What does “corresponding” refer to? Does it refer to the links object of the relationship object of the included collection?
That would make sence to me. But in this case, wouldn´t it violate the fo ..read more
JSON API Forums
1w ago
Hi all, I’d just like to clarify the meaning of a top-level document with both an errors property and a links property.
The spec clearly states that a top-level document without a data property will not have an included property either:
If a document does not contain a top-level data key, the included member MUST NOT be present either.
However, no such condition exists for links. And the spec defines the links field as such:
links: a links object related to the primary data.
So, I ask: what does it mean to have links that are “related to the primary data” when no such primary data is inc ..read more
JSON API Forums
3w ago
What is the current maintenance status of the JSON:API spec?
Version 1.1 was long awaited and landed September 2022. With the addition of profiles and extensions, future adjustments to the spec are less likely to be dramatic in nature. That said, there’s still organizational work to be done, e.g. with regards a valid JSON Schema for both 1.0 and 1.1.
The PR for publishing an updated 1.0-compatible schema broke the well-known URL at https://jsonapi.org/schema and the new schema isn’t available on jsonapi.org at all, only in the codebase.
I don’t point this out to nitpick - open-source software ..read more
JSON API Forums
1M ago
Hi!
Again a question about relationships with data and the related resources.
I’m having some troubles to find a solution for this problem. We have:
projects
Projects exists on their own, hence we have defined the following endpoints:
projects
projects/{projectId}
templates
Templates exists only within a project. Also we have the following endpoints:
projects/{projectId}/templates
projects/{projectId}/templates/{templateId}
components
Components are also independent entities hence we have:
components
components/{componentId}
Each component could be assigned to one or more projects a ..read more
JSON API Forums
2M ago
I am checking my crawler status with Ahrefs and Moz, Google but it’s showing The HTTP server returned error 406: “Not Acceptable”. This request was likely filtered by a firewall. My website is protected by the Cloudflare firewall.
1 post - 1 participant
Read full topic ..read more
JSON API Forums
2M ago
I know I that I can post multipart/form data with boundaries via HTTP POST.
What I’m looking to confirm, and possibly get a review of, is posting a file as a base64 string as part of a larger JSON object. For example:
[
{
data: {
type: documents,
lid: 0,
attributes: {
foo: string,
bar: integer,
file: data:mime/type:ZmlsZWRhdGEK...
...
...
}
},
{
data: {
type: documents,
lid: 1,
...
}
},
{
data: {
type: documents,
lid: 2,
...
}
}
]
The file here could be a video, an ..read more
JSON API Forums
2M ago
I have been using JSON:API in projects at my day job for some amount of time and really like to implement APIs by this standard. I think the flat structure of collections (of resource objects) and the simple URLs that result from it are a key strength.
However this flat structure now produces some headaches in one of my private projects. I have some types that are closely related to each other and thus I want to add the same prefix to those that make a group of related resources, effectively adding namespaces to member names:
For example:
“type”: “windows::file” or
“type”: “windows::user” or ..read more
JSON API Forums
2M ago
Hey everyone, I’m using JSON:API for my back-end and the mobile app client needs to deserialize the compound document responses as efficiently and fast as possible. I’m used to deserializing API responses that have an object structure where the relationships are directly mapped to the primary data with key value pairs. But with compound documents, the related resources are in a separate ‘included’ array. It appears to be inefficient to use the ids of the resources in the relationships object to search for the full resource object that I need to load into the app. Are there good libraries or ap ..read more
JSON API Forums
2M ago
Section 7.2.1 (Identification) suggests to use a “lid” member inside of resource identifier objects to identify the resource locally within the document when creating new resources. But the specification does not provide further examples.
When creating a new resource, the corresponding JSON:API document can only contain the one resource object that should be created on the server. Where in the document may the primary resource be referenced by the “lid” member?
Thanks for clarification!
5 posts - 3 participants
Read full topic ..read more