You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some APIs return the current state of an object so that the user can change some properties and then send the whole object back to server.
This use case seems to be impossible with HalBuilder as the RepresentationReader API only returns a ReadableRepresentation and there is no way to convert that to a modifyable Representation.
(of course I could copy all links, namespaces, properties and resources but that should be hidden in the API)
The issue seems to be easy fixable as Representation is a subclass of ReadableRepresentation so backwards compatibility is given. Also the returned object is explicitly converted from Representation to ImmutableRepresentation in JsonRepresentationReader's read() method so it would be enough to skip that step.
The text was updated successfully, but these errors were encountered:
Finally getting around to looking at this issue, I'm currently leaning towards dropping both ImmutableRepresentationandMutableRepresentation in favour of something like a PersistentRepresentation - part of this would be switching to use TotallyLazy's PersistentMaps/PersistentLists for internal collections ( I might need to write my own PersistentMultimap as well ).
Each withXXX call would return a new PersistentRepresentation with the relevant changes.
Some APIs return the current state of an object so that the user can change some properties and then send the whole object back to server.
This use case seems to be impossible with HalBuilder as the RepresentationReader API only returns a ReadableRepresentation and there is no way to convert that to a modifyable Representation.
(of course I could copy all links, namespaces, properties and resources but that should be hidden in the API)
The issue seems to be easy fixable as Representation is a subclass of ReadableRepresentation so backwards compatibility is given. Also the returned object is explicitly converted from Representation to ImmutableRepresentation in JsonRepresentationReader's read() method so it would be enough to skip that step.
The text was updated successfully, but these errors were encountered: