Roman Suzi
1 min readJul 11, 2019

--

Article on a rare topic, thanks for sharing your experience!

Some points though. Instead of id, full URI can be used. Increase in size is negligible, but the client side will not need to use conventions to access deferred entities, so the it will be more HATEOAS. See for example how OData deals with it: https://www.odata.org/documentation/odata-version-2-0/json-format/.

For more involved cases like accessing deeper, essentially graph data, it may be good idea to use specialized add-ons on top of JSON, for example JSON-LD or GraphQL. For example, in JSON-LD it is possible to frame the result into different JSON-LD “serializations”.

--

--

Responses (1)