--
You received this message because you are subscribed to the Google Groups "HALBuilder Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to halbuilder-de...@googlegroups.com.
To post to this group, send email to halbuil...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/halbuilder-dev/9ec7e1dc-207d-4c42-9203-5eab80f9a375%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I think there is a common scenario here that HAL doesn't support very well. It is the case where you are dynamically returning a list of resources in the HAL+JSON response and the list can be of varying length (0 to N). A common case for this is search or listing sub resources.
From a developer experience perspective for the client consuming the HAL service, it seems pretty poor that you have to account for a number of different cases when parsing the HAL+JSON even though you are expecting search results or a collection of sub resources:
someResource.$get('someSubResource')
if (someResource.$has('someSubResource')) someResource.$get('someSubResource')On 15 Aug 2014, at 20:28, Steven Bakhtiari wrote:
Fortunately, HALBUILDER has
the SINGLE_ELEM_ARRAYS option to avoid making clients jump through even
As as of the 4.x series it no longer has that ( its on by default, with a COALESCE_ARRAYS and to drop down to a single object if there's only one ( the self link is ALWAYS coalesced tho ).
So, do HAL builder support this now, or is there any chance of requesting
it as a feature?
To put it in total plain text, what you're wanting is a way of saying:
Currently, there's no way of handling what other than swapping in your own JSON writer subclass. Personally, I'd be against such a construct, just like with HTTP headers, you don't include every possible header without a value do you? You only include it if its used in THIS representation.
Mark