Open C06A opened 6 years ago
Technically { }
should be a perfectly valid HAL document, as links are option, and as you say - it's a valid JSON object.
I'll take a look at it tonight. Is this a blocking issue for you at all?
I believe {“_links”: {“self”:{“href”:”....”}}} would be the minimal valid HAL document unlike JSON.
It is not blocking for me. I am just learning how to use HALBuilder for now.
CAB
Sent from my iPhone
On Apr 2, 2018, at 11:17 PM, Mark Derricutt notifications@github.com wrote:
Technically { } should be a perfectly valid HAL document, as links are option, and as you say - it's a valid JSON object.
I'll take a look at it tonight. Is this a blocking issue for you at all?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
In the follow code the
print(...)
method throws NPE when try to get the type of the tree.The empty resource should be printed into
{}
string. This would be empty JSON document.On another hand because empty JSON is not valid HAL document I guess factory call
ResourceRepresentation.empty()
should not be allowed.The same problem exists even of I provide href for self link. So any call to empty(...) produces invalid ResourceRepresentation instance.